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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EscrowFactory | stableescrow.sol | 0xd03a329e6a1f05d0c797215a82e8f0e14f241d4b | Solidity | EscrowFactory | contract EscrowFactory is owned
{
/*
1) The Escrow Factory contract to create and manage Escrows
2) Only the Escrow Factory is owned by the manager
3) The manager has no control over each Escrow or the cumulative payment locked in the Factory contract
*/
address constant p... | createNewEscrow | function createNewEscrow(address escrowpayee, uint escrowamount) external
{
require(factorycontractactive, "Factory Contract should be Active");
require(escrowid < maxuint, "Maximum escrowid reached");
require(msg.sender != escrowpayee,"The Payer, payee should be different");
require(escrowpay... | //create new escrow | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://b80b0d3a2f6700979825fe5f689f9982ac6146fbc93c527521f6eebb19e80b32 | {
"func_code_index": [
2936,
4395
]
} | 5,600 | ||
EscrowFactory | stableescrow.sol | 0xd03a329e6a1f05d0c797215a82e8f0e14f241d4b | Solidity | EscrowFactory | contract EscrowFactory is owned
{
/*
1) The Escrow Factory contract to create and manage Escrows
2) Only the Escrow Factory is owned by the manager
3) The manager has no control over each Escrow or the cumulative payment locked in the Factory contract
*/
address constant p... | createNewEscrow | function createNewEscrow(address escrowpayee, uint escrowamount, address escrowmoderator, uint escrowmoderatorfee) external
{
require(factorycontractactive, "Factory Contract should be Active");
require(escrowid < maxuint, "Maximum escrowid reached");
require(msg.sender != escrowpayee && msg.sende... | //create new escrow overload | LineComment | v0.6.12+commit.27d51765 | GNU GPLv3 | ipfs://b80b0d3a2f6700979825fe5f689f9982ac6146fbc93c527521f6eebb19e80b32 | {
"func_code_index": [
4435,
6290
]
} | 5,601 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | ISwapRouter | interface ISwapRouter is IUniswapV3SwapCallback {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
/// ... | /// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3 | NatSpecSingleLine | exactInputSingle | function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
| /// @notice Swaps `amountIn` of one token for as much as possible of another token
/// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata
/// @return amountOut The amount of the received token | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
567,
682
]
} | 5,602 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | ISwapRouter | interface ISwapRouter is IUniswapV3SwapCallback {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
/// ... | /// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3 | NatSpecSingleLine | exactInput | function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut);
| /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path
/// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata
/// @return amountOut The amount of the received token | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1132,
1235
]
} | 5,603 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | ISwapRouter | interface ISwapRouter is IUniswapV3SwapCallback {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
/// ... | /// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3 | NatSpecSingleLine | exactOutputSingle | function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn);
| /// @notice Swaps as little as possible of one token for `amountOut` of another token
/// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata
/// @return amountIn The amount of the input token | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1755,
1871
]
} | 5,604 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | ISwapRouter | interface ISwapRouter is IUniswapV3SwapCallback {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
/// ... | /// @title Router token swapping functionality
/// @notice Functions for swapping tokens via Uniswap V3 | NatSpecSingleLine | exactOutput | function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn);
| /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed)
/// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata
/// @return amountIn The amount of the input token | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2333,
2437
]
} | 5,605 | ||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
89,
266
]
} | 5,606 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
350,
630
]
} | 5,607 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
744,
860
]
} | 5,608 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
if (a == 0) {
return 0;
}
c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, tr... | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
924,
1054
]
} | 5,609 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
199,
287
]
} | 5,610 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
445,
777
]
} | 5,611 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
983,
1087
]
} | 5,612 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
401,
858
]
} | 5,613 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
1490,
1685
]
} | 5,614 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
2009,
2140
]
} | 5,615 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
2606,
2875
]
} | 5,616 | |||
KuoMingToken | KuoMingToken.sol | 0x284764679123e3aa1f460c4498b7dbd666067b9d | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approva... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.23+commit.124ca40d | bzzr://881fc6a7358e7998351f0354065999a0fa6f410ef62be1c5310660ae0153a285 | {
"func_code_index": [
3346,
3761
]
} | 5,617 | |||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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);
/**... | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the amount of tokens in existence.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
94,
154
]
} | 5,618 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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);
/**... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
237,
310
]
} | 5,619 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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);
/**... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
534,
616
]
} | 5,620 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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);
/**... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
895,
983
]
} | 5,621 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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);
/**... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
1647,
1726
]
} | 5,622 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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);
/**... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
2039,
2141
]
} | 5,623 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
259,
445
]
} | 5,624 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
723,
864
]
} | 5,625 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
1162,
1359
]
} | 5,626 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
1613,
2089
]
} | 5,627 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
2560,
2697
]
} | 5,628 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
3188,
3471
]
} | 5,629 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
3931,
4066
]
} | 5,630 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns ... | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
4546,
4717
]
} | 5,631 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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 ... | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
606,
1230
]
} | 5,632 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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 ... | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
2160,
2562
]
} | 5,633 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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 ... | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
3318,
3496
]
} | 5,634 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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 ... | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
3721,
3922
]
} | 5,635 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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 ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
4292,
4523
]
} | 5,636 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | 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 ... | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
4774,
5095
]
} | 5,637 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
497,
581
]
} | 5,638 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
1139,
1292
]
} | 5,639 | ||
ShepFinance | ShepFinance.sol | 0xe1922512914fa1b1309dfedbbdef3836b0abdcb9 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSend... | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://ff13e9810158404af4492daa91fb38bc7c3fd38c7cc61f343a491fd44f6343ba | {
"func_code_index": [
1442,
1691
]
} | 5,640 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/base/PeripheryPayments.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | PeripheryPayments | abstract contract PeripheryPayments is IPeripheryPayments, PeripheryImmutableState {
receive() external payable {
require(msg.sender == WETH9, 'Not WETH9');
}
/// @inheritdoc IPeripheryPayments
function unwrapWETH9(uint256 amountMinimum, address recipient) external payable override {
ui... | // | LineComment | unwrapWETH9 | function unwrapWETH9(uint256 amountMinimum, address recipient) external payable override {
uint256 balanceWETH9 = IWETH9(WETH9).balanceOf(address(this));
require(balanceWETH9 >= amountMinimum, 'Insufficient WETH9');
if (balanceWETH9 > 0) {
IWETH9(WETH9).withdraw(balanceWETH9);
TransferHelpe... | /// @inheritdoc IPeripheryPayments | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
215,
618
]
} | 5,641 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/base/PeripheryPayments.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | PeripheryPayments | abstract contract PeripheryPayments is IPeripheryPayments, PeripheryImmutableState {
receive() external payable {
require(msg.sender == WETH9, 'Not WETH9');
}
/// @inheritdoc IPeripheryPayments
function unwrapWETH9(uint256 amountMinimum, address recipient) external payable override {
ui... | // | LineComment | sweepToken | function sweepToken(
address token,
uint256 amountMinimum,
address recipient
) external payable override {
uint256 balanceToken = IERC20(token).balanceOf(address(this));
require(balanceToken >= amountMinimum, 'Insufficient token');
if (balanceToken > 0) {
TransferHelper.safeTransfer(tok... | /// @inheritdoc IPeripheryPayments | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
659,
1060
]
} | 5,642 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/base/PeripheryPayments.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | PeripheryPayments | abstract contract PeripheryPayments is IPeripheryPayments, PeripheryImmutableState {
receive() external payable {
require(msg.sender == WETH9, 'Not WETH9');
}
/// @inheritdoc IPeripheryPayments
function unwrapWETH9(uint256 amountMinimum, address recipient) external payable override {
ui... | // | LineComment | refundETH | function refundETH() external payable override {
if (address(this).balance > 0) TransferHelper.safeTransferETH(msg.sender, address(this).balance);
}
| /// @inheritdoc IPeripheryPayments | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1101,
1265
]
} | 5,643 | ||
FlashLiquidator | @uniswap/v3-periphery/contracts/base/PeripheryPayments.sol | 0x23d85060f87218bb276afe55a26bfd3b5f59914e | Solidity | PeripheryPayments | abstract contract PeripheryPayments is IPeripheryPayments, PeripheryImmutableState {
receive() external payable {
require(msg.sender == WETH9, 'Not WETH9');
}
/// @inheritdoc IPeripheryPayments
function unwrapWETH9(uint256 amountMinimum, address recipient) external payable override {
ui... | // | LineComment | pay | function pay(
address token,
address payer,
address recipient,
uint256 value
) internal {
if (token == WETH9 && address(this).balance >= value) {
// pay with WETH9
IWETH9(WETH9).deposit{value: value}(); // wrap only what is needed to pay
IWETH9(WETH9).transfer(recipient, valu... | /// @param token The token to pay
/// @param payer The entity that must pay
/// @param recipient The entity that will receive payment
/// @param value The amount to pay | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1452,
2155
]
} | 5,644 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC165 | interface ERC165 {
/**
* @notice Query if a contract implements an interface
* @param _interfaceId The interface identifier, as specified in ERC-165
* @dev Interface identification is specified in ERC-165. This function
* uses less than 30,000 gas.
*/
function supportsInterface(bytes4 _inter... | /**
* @title ERC165
* @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 _interfaceId)
external
view
returns (bool);
| /**
* @notice Query if a contract implements an interface
* @param _interfaceId The interface identifier, as specified in ERC-165
* @dev Interface identification is specified in ERC-165. This function
* uses less than 30,000 gas.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
278,
373
]
} | 5,645 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721Receiver | interface ERC721Receiver {
/**
* @dev Magic value to be returned upon successful reception of an NFT
* Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`,
* which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
*/
// bytes4 internal constan... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(
address _operator,
address _from,
uint256 _tokenId,
bytes memory _data
) external returns(bytes4);
| /**
* @notice Handle the receipt of an NFT
* @dev The ERC721 smart contract calls this function on the recipient
* after a `safetransfer`. This function MAY throw to revert and reject the
* transfer. Return of other than the magic value MUST result in the
* transaction being reverted.
* Note: the contract a... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
1087,
1240
]
} | 5,646 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | AddressUtils | library AddressUtils {
/**
* Returns whether the target address is a contract
* @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 to check
* @return whether the... | /**
* Utility library of inline functions on addresses
*/ | NatSpecMultiLine | isContract | function isContract(address _addr) internal view returns (bool) {
uint256 size;
// XXX Currently there is no better way to check if there is a contract in an address
// than to check the size of the code at that address.
// See https://ethereum.stackexchange.com/a/14016/36603
// for more details about ho... | /**
* Returns whether the target address is a contract
* @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 to check
* @return whether the target address is a contract
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
358,
950
]
} | 5,647 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | SupportsInterfaceWithLookup | contract SupportsInterfaceWithLookup is ERC165 {
bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7;
/**
* 0x01ffc9a7 ===
* bytes4(keccak256('supportsInterface(bytes4)'))
*/
/**
* @dev a mapping of interface id to whether or not it's supported
*/
mapping(bytes4 => bool) interna... | /**
* @title SupportsInterfaceWithLookup
* @author Matt Condon (@shrugs)
* @dev Implements ERC165 using a lookup table.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 _interfaceId)
external
override
view
returns (bool)
{
return supportedInterfaces[_interfaceId];
}
| /**
* @dev implement supportsInterface(bytes4) using a lookup table
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
621,
786
]
} | 5,648 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | SupportsInterfaceWithLookup | contract SupportsInterfaceWithLookup is ERC165 {
bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7;
/**
* 0x01ffc9a7 ===
* bytes4(keccak256('supportsInterface(bytes4)'))
*/
/**
* @dev a mapping of interface id to whether or not it's supported
*/
mapping(bytes4 => bool) interna... | /**
* @title SupportsInterfaceWithLookup
* @author Matt Condon (@shrugs)
* @dev Implements ERC165 using a lookup table.
*/ | NatSpecMultiLine | _registerInterface | function _registerInterface(bytes4 _interfaceId)
internal
{
require(_interfaceId != 0xffffffff);
supportedInterfaces[_interfaceId] = true;
}
| /**
* @dev private method for registering an interface
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
858,
1022
]
} | 5,649 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | IERC721Enumerable | interface IERC721Enumerable is ERC721Basic {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
} | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the total amount of tokens stored by the contract.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
138,
198
]
} | 5,650 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address _owner) public view override returns (uint256) {
require(_owner != address(0));
return ownedTokensCount[_owner];
}
| /*
* @dev Gets the balance of the specified address
* @param _owner address to query the balance of
* @return uint256 representing the amount owned by the passed address
*/ | Comment | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
2517,
2674
]
} | 5,651 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 _tokenId) public view override returns (address) {
address owner = tokenOwner[_tokenId];
require(owner != address(0));
return owner;
}
| /**
* @dev Gets the owner of the specified token ID
* @param _tokenId uint256 ID of the token to query the owner of
* @return owner address currently marked as the owner of the given token ID
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
2891,
3071
]
} | 5,652 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | exists | function exists(uint256 _tokenId) public view override returns (bool) {
address owner = tokenOwner[_tokenId];
return owner != address(0);
}
| /*
* @dev Returns whether the specified token exists
* @param _tokenId uint256 ID of the token to query the existence of
* @return whether the token exists
*/ | Comment | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
3252,
3407
]
} | 5,653 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | approve | function approve(address _to, uint256 _tokenId) override public {
address owner = ownerOf(_tokenId);
require(_to != owner);
require(msg.sender == owner || isApprovedForAll(owner, msg.sender));
tokenApprovals[_tokenId] = _to;
emit Approval(owner, _to, _tokenId);
}
| /**
* @dev Approves another address to transfer the given token ID
* The zero address indicates there is no approved address.
* There can only be one approved address per token at a given time.
* Can only be called by the token owner or an approved operator.
* @param _to address to be approved for the given t... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
3819,
4115
]
} | 5,654 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 _tokenId) public view override returns (address) {
return tokenApprovals[_tokenId];
}
| /**
* @dev Gets the approved address for a token ID, or zero if no address set
* @param _tokenId uint256 ID of the token to query the approval of
* @return address currently approved for the given token ID
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
4346,
4471
]
} | 5,655 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address _to, bool _approved) override public {
require(_to != msg.sender);
operatorApprovals[msg.sender][_to] = _approved;
emit ApprovalForAll(msg.sender, _to, _approved);
}
| /**
* @dev Sets or unsets the approval of a given operator
* An operator is allowed to transfer all tokens of the sender on their behalf
* @param _to operator address to set the approval
* @param _approved representing the status of the approval to be set
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
4756,
4977
]
} | 5,656 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(
address _owner,
address _operator
)
public
view
override
returns (bool)
{
return operatorApprovals[_owner][_operator];
}
| /**
* @dev Tells whether an operator is approved by a given owner
* @param _owner owner address which you want to query the approval of
* @param _operator operator address which you want to query the approval of
* @return bool whether the given operator is approved by the given owner
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
5291,
5485
]
} | 5,657 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | transferFrom | function transferFrom(
address _from,
address _to,
uint256 _tokenId
)
public
override
{
require(isApprovedOrOwner(msg.sender, _tokenId));
require(_from != address(0));
require(_to != address(0));
clearApproval(_from, _tokenId);
removeTokenFrom(_from, _tokenId);
addTokenTo(_to, _toke... | /**
* @dev Transfers the ownership of a given token ID to another address
* Usage of this method is discouraged, use `safeTransferFrom` whenever possible
* Requires the msg sender to be the owner, approved, or operator
* @param _from current owner of the token
* @param _to address to receive the ownership of ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
5910,
6313
]
} | 5,658 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId
)
public
override
{
// solium-disable-next-line arg-overflow
safeTransferFrom(_from, _to, _tokenId, "");
}
| /**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
6940,
7165
]
} | 5,659 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes memory _data
)
override
public
{
transferFrom(_from, _to, _tokenId);
// solium-disable-next-line arg-overflow
require(checkAndCallSafeTransfer(_from, _to, _tokenId, _data));
}
| /**
* @dev Safely transfers the ownership of a given token ID to another address
* If the target address is a contract, it must implement `onERC721Received`,
* which is called upon a safe transfer, and return the magic value
* `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
7858,
8169
]
} | 5,660 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | isApprovedOrOwner | function isApprovedOrOwner(
address _spender,
uint256 _tokenId
)
internal
view
returns (bool)
{
address owner = ownerOf(_tokenId);
// Disable solium check because of
// https://github.com/duaraghav8/Solium/issues/175
// solium-disable-next-line operator-whitespace
return (
_spender ... | /**
* @dev Returns whether the given spender can transfer a given token ID
* @param _spender address of the spender to query
* @param _tokenId uint256 ID of the token to be transferred
* @return bool whether the msg.sender is approved for the given token ID,
* is an operator of the owner, or is the owner of ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
8522,
8980
]
} | 5,661 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | _mint | function _mint(address _to, uint256 _tokenId) virtual internal {
require(_to != address(0));
addTokenTo(_to, _tokenId);
emit Transfer(address(0), _to, _tokenId);
}
| /**
* @dev Internal function to mint a new token
* Reverts if the given token ID already exists
* @param _to The address that will own the minted token
* @param _tokenId uint256 ID of the token to be minted by the msg.sender
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
9234,
9418
]
} | 5,662 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | _burn | function _burn(address _owner, uint256 _tokenId) virtual internal {
clearApproval(_owner, _tokenId);
removeTokenFrom(_owner, _tokenId);
emit Transfer(_owner, address(0), _tokenId);
}
| /**
* @dev Internal function to burn a specific token
* Reverts if the token does not exist
* @param _tokenId uint256 ID of the token being burned by the msg.sender
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
9608,
9811
]
} | 5,663 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | clearApproval | function clearApproval(address _owner, uint256 _tokenId) internal {
require(ownerOf(_tokenId) == _owner);
if (tokenApprovals[_tokenId] != address(0)) {
tokenApprovals[_tokenId] = address(0);
}
}
| /**
* @dev Internal function to clear current approval of a given token ID
* Reverts if the given address is not indeed the owner of the token
* @param _owner owner of the token
* @param _tokenId uint256 ID of the token to be transferred
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
10078,
10300
]
} | 5,664 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | addTokenTo | function addTokenTo(address _to, uint256 _tokenId) virtual internal {
require(tokenOwner[_tokenId] == address(0));
tokenOwner[_tokenId] = _to;
ownedTokensCount[_to] = ownedTokensCount[_to].add(1);
}
| /**
* @dev Internal function to add a token ID to the list of a given address
* @param _to address representing the new owner of the given token ID
* @param _tokenId uint256 ID of the token to be added to the tokens list of the given address
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
10567,
10786
]
} | 5,665 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | removeTokenFrom | function removeTokenFrom(address _from, uint256 _tokenId) virtual internal {
require(ownerOf(_tokenId) == _from);
ownedTokensCount[_from] = ownedTokensCount[_from].sub(1);
tokenOwner[_tokenId] = address(0);
}
| /**
* @dev Internal function to remove a token ID from the list of a given address
* @param _from address representing the previous owner of the given token ID
* @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
11069,
11298
]
} | 5,666 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | ERC721BasicToken | contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
using SafeMath for uint256;
using AddressUtils for address;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
bytes4... | /**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
*/ | NatSpecMultiLine | checkAndCallSafeTransfer | function checkAndCallSafeTransfer(
address _from,
address _to,
uint256 _tokenId,
bytes memory _data
)
internal
returns (bool)
{
if (!_to.isContract()) {
return true;
}
bytes4 retval = ERC721Receiver(_to).onERC721Received(
msg.sender, _from, _tokenId, _data);
return (retval == E... | /**
* @dev Internal function to invoke `onERC721Received` on a target address
* The call is not executed if the target address is not a contract
* @param _from address representing the previous owner of the given token ID
* @param _to target address that will receive the tokens
* @param _tokenId uint256 ID of... | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
11812,
12184
]
} | 5,667 |
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | MyERC721Metadata | contract MyERC721Metadata is ERC165, ERC721BasicToken, Owned {
// Token name
string private _name;
// Token symbol
string private _symbol;
uint256 public _max_supply;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/*
* bytes4... | name | function name() external view returns (string memory) {
return _name;
}
| /**
* @dev Gets the token name.
* @return string representing the token name
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
1880,
1970
]
} | 5,668 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | MyERC721Metadata | contract MyERC721Metadata is ERC165, ERC721BasicToken, Owned {
// Token name
string private _name;
// Token symbol
string private _symbol;
uint256 public _max_supply;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/*
* bytes4... | symbol | function symbol() external view returns (string memory) {
return _symbol;
}
| /**
* @dev Gets the token symbol.
* @return string representing the token symbol
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
2080,
2174
]
} | 5,669 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | MyERC721Metadata | contract MyERC721Metadata is ERC165, ERC721BasicToken, Owned {
// Token name
string private _name;
// Token symbol
string private _symbol;
uint256 public _max_supply;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/*
* bytes4... | tokenURI | function tokenURI(uint256 tokenId) external view returns (string memory) {
require(exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory url = _tokenURIs[tokenId];
bytes memory urlAsBytes = bytes(url);
if (urlAsBytes.length == 0) {
bytes memory baseURIAsBytes = ... | /**
* @dev Returns an URI for a given token ID.
* Throws if the token ID does not exist. May return an empty string.
* @param tokenId uint256 ID of the token to query
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
2478,
3385
]
} | 5,670 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | MyERC721Metadata | contract MyERC721Metadata is ERC165, ERC721BasicToken, Owned {
// Token name
string private _name;
// Token symbol
string private _symbol;
uint256 public _max_supply;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/*
* bytes4... | _setTokenURI | function _setTokenURI(uint256 tokenId, string memory uri) internal {
require(exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = uri;
}
| /**
* @dev Internal function to set the token URI for a given token.
* Reverts if the token ID does not exist.
* @param tokenId uint256 ID of the token to set its URI
* @param uri string URI to assign
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
3627,
3826
]
} | 5,671 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | MyERC721Metadata | contract MyERC721Metadata is ERC165, ERC721BasicToken, Owned {
// Token name
string private _name;
// Token symbol
string private _symbol;
uint256 public _max_supply;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/*
* bytes4... | _burn | function _burn(address owner, uint256 tokenId) override internal {
super._burn(owner,tokenId);
// Clear metadata (if any)
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
}
| /**
* @dev Internal function to burn a specific token.
* Reverts if the token does not exist.
* Deprecated, use _burn(uint256) instead.
* @param owner owner of the token to burn
* @param tokenId uint256 ID of the token being burned by the msg.sender
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
4123,
4383
]
} | 5,672 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | CulturalArtTreasure | contract CulturalArtTreasure is MyERC721Metadata,IERC721Enumerable {
using Attributes for Attributes.Data;
using Attributes for Attributes.Value;
using Counters for Counters.Counter;
using Accounts for Accounts.Data;
using Accounts for Accounts.Account;
string public constant TYPE_KEY = ... | mint | function mint(address _to,uint256 amount) public returns (uint256) {
require(_tokenIds.current() + amount < _max_supply, "CulturalArtTreasure: maximum quantity reached");
require(amount > 0, "You must buy at least one .");
uint256 newTokenId = 1;
for (uint256 i = 0; i < amount; i++) {
tok... | /**
* @dev Mint token
*
* @param _to address of token owner
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
1421,
2003
]
} | 5,673 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | CulturalArtTreasure | contract CulturalArtTreasure is MyERC721Metadata,IERC721Enumerable {
using Attributes for Attributes.Data;
using Attributes for Attributes.Value;
using Counters for Counters.Counter;
using Accounts for Accounts.Data;
using Accounts for Accounts.Account;
string public constant TYPE_KEY = ... | numberOfAttributes | function numberOfAttributes(uint256 tokenId) public view returns (uint) {
Attributes.Data storage attributes = attributesByTokenIds[tokenId];
if (!attributes.initialised) {
return 0;
} else {
return attributes.length();
}
}
| // Attributes | LineComment | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
2342,
2637
]
} | 5,674 | ||
CulturalArtTreasure | CulturalArtTreasure.sol | 0x7d196c1f1afeea48364ad85587f593b42621787d | Solidity | CulturalArtTreasure | contract CulturalArtTreasure is MyERC721Metadata,IERC721Enumerable {
using Attributes for Attributes.Data;
using Attributes for Attributes.Value;
using Counters for Counters.Counter;
using Accounts for Accounts.Data;
using Accounts for Accounts.Account;
string public constant TYPE_KEY = ... | totalSupply | function totalSupply() public view virtual override returns (uint256) {
// _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
return _tokenIds.current();
}
| /**
* @dev See {IERC721Enumerable-totalSupply}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | None | ipfs://fa498aaa5784baa128d9dd61551772349771a6bcd154a7206d741f3c775e15fb | {
"func_code_index": [
7933,
8147
]
} | 5,675 | ||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
| /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
89,
272
]
} | 5,676 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
356,
629
]
} | 5,677 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
744,
860
]
} | 5,678 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbe... | /**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/ | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
924,
1060
]
} | 5,679 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duratio... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | TokenVesting | function TokenVesting(address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, bool _revocable) public {
require(_beneficiary != address(0));
require(_cliff <= _duration);
beneficiary = _beneficiary;
revocable = _revocable;
duration = _duration;
cliff = _start.add(_cliff);
start =... | /**
* @dev Creates a vesting contract that vests its balance of any ERC20 token to the
* _beneficiary, gradually in a linear fashion until _start + _duration. By then all
* of the balance will have vested.
* @param _beneficiary address of the beneficiary to whom vested tokens are transferred
* @param _cliff d... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
1008,
1358
]
} | 5,680 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duratio... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | release | function release(ERC20Basic token) public {
uint256 unreleased = releasableAmount(token);
require(unreleased > 0);
released[token] = released[token].add(unreleased);
token.safeTransfer(beneficiary, unreleased);
Released(unreleased);
}
| /**
* @notice Transfers vested tokens to beneficiary.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
1482,
1755
]
} | 5,681 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duratio... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | revoke | function revoke(ERC20Basic token) public onlyOwner {
require(revocable);
require(!revoked[token]);
uint256 balance = token.balanceOf(this);
uint256 unreleased = releasableAmount(token);
uint256 refund = balance.sub(unreleased);
revoked[token] = true;
token.safeTransfer(owner, refund);
... | /**
* @notice Allows the owner to revoke the vesting. Tokens already vested
* remain in the contract, the rest are returned to the owner.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
1967,
2321
]
} | 5,682 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duratio... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | releasableAmount | function releasableAmount(ERC20Basic token) public view returns (uint256) {
return vestedAmount(token).sub(released[token]);
}
| /**
* @dev Calculates the amount that has already vested but hasn't been released yet.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
2478,
2615
]
} | 5,683 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | TokenVesting | contract TokenVesting is Ownable {
using SafeMath for uint256;
using SafeERC20 for ERC20Basic;
event Released(uint256 amount);
event Revoked();
// beneficiary of tokens after they are released
address public beneficiary;
uint256 public cliff;
uint256 public start;
uint256 public duratio... | /**
* @title TokenVesting
* @dev A token holder contract that can release its token balance gradually like a
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner.
*/ | NatSpecMultiLine | vestedAmount | function vestedAmount(ERC20Basic token) public view returns (uint256) {
uint256 currentBalance = token.balanceOf(this);
uint256 totalBalance = currentBalance.add(released[token]);
if (now < cliff) {
return 0;
} else if (now >= start.add(duration) || revoked[token]) {
return totalBalance;
} el... | /**
* @dev Calculates the amount that has already vested.
* @param token ERC20 token which is being vested
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
2743,
3158
]
} | 5,684 | |
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | startTde | function startTde()
public
onlyOwner
{
require(!isFinalized);
tdeActive = true;
tdeStarted = true;
if (tdeStartTime == 0) {
tdeStartTime = block.timestamp;
}
TdeStarted(tdeStartTime);
}
| /**
* @dev Allows contract owner to start the TDE.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
2167,
2452
]
} | 5,685 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | stopTde | function stopTde(bool _restart)
external
onlyOwner
{
tdeActive = false;
if (_restart) {
tdeStartTime = 0;
}
TdeStopped(block.timestamp);
}
| /**
* @dev Allows contract owner to stop and optionally restart the TDE.
* @param _restart Resets the tdeStartTime if true.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
2605,
2813
]
} | 5,686 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | extendTde | function extendTde(uint256 _time)
external
onlyOwner
{
tdeDuration = tdeDuration.add(_time);
}
| /**
* @dev Allows contract owner to increase TDE period.
* @param _time amount of time to increase TDE period by.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
2956,
3090
]
} | 5,687 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | shortenTde | function shortenTde(uint256 _time)
external
onlyOwner
{
tdeDuration = tdeDuration.sub(_time);
}
| /**
* @dev Allows contract owner to reduce TDE period.
* @param _time amount of time to reduce TDE period by.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
3229,
3364
]
} | 5,688 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | setTdeIssuer | function setTdeIssuer(address _tdeIssuer)
external
onlyOwner
{
tdeIssuer = _tdeIssuer;
}
| /**
* @dev Allows contract owner to set the FTT issuing authority.
* @param _tdeIssuer address of FTT issuing authority.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
3514,
3644
]
} | 5,689 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | setOperationalReserveAddress | function setOperationalReserveAddress(address _operationalReserveAddress)
external
onlyOwner
tdeRunning
{
operationalReserveAddress = _operationalReserveAddress;
}
| /**
* @dev Allows contract owner to set the beneficiary of the FT operational reserve amount of FTT.
* @param _operationalReserveAddress address of FT operational reserve beneficiary.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
3857,
4071
]
} | 5,690 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | issueFTT | function issueFTT(address _user, uint256 _fttAmount)
public
onlyTdeIssuer
tdeRunning
returns(bool)
{
uint256 newAmountIssued = fttIssued.add(_fttAmount);
require(_user != address(0));
require(_fttAmount > 0);
require(newAmountIssued <= FT_TOKEN_SALE_CAP);
balances[_user] ... | /**
* @dev Issues FTT to entitled accounts.
* @param _user address to issue FTT to.
* @param _fttAmount amount of FTT to issue.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
4234,
4861
]
} | 5,691 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | fttIssued | function fttIssued()
external
view
returns (uint256)
{
return fttIssued;
}
| /**
* @dev Returns amount of FTT issued.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
4925,
5050
]
} | 5,692 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | finalize | function finalize()
external
tdeEnded
onlyOwner
{
require(!isFinalized);
// Deposit team fund amount into team vesting contract.
uint256 teamVestingCliff = 15778476; // 6 months
uint256 teamVestingDuration = 1 years;
TokenVesting teamVesting = new TokenVesting(owner, now, tea... | /**
* @dev Allows the contract owner to finalize the TDE.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
5131,
6422
]
} | 5,693 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value)
public
returns (bool)
{
if (!isFinalized) return false;
require(_to != address(0));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
... | /**
* @dev Transfer tokens from one address to another. Trading limited - requires the TDE to have ended.
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
6765,
7317
]
} | 5,694 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | transfer | function transfer(address _to, uint256 _value)
public
returns (bool)
{
if (!isFinalized) return false;
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Trans... | /**
* @dev Transfer token for a specified address. Trading limited - requires the TDE to have ended.
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
7538,
7957
]
} | 5,695 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | approve | function approve(address _spender, uint256 _value)
public
returns (bool)
{
require(_spender != address(0));
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* ... | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
8609,
8880
]
} | 5,696 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | balanceOf | function balanceOf(address _owner)
public
view
returns (uint256 balance)
{
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
9096,
9248
]
} | 5,697 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | allowance | function allowance(address _owner, address _spender)
public
view
returns (uint256)
{
return allowed[_owner][_spender];
}
| /**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
9584,
9755
]
} | 5,698 | |||
FTT | FTT.sol | 0x2aec18c5500f21359ce1bea5dc1777344df4c0dc | Solidity | FTT | contract FTT is Ownable {
using SafeMath for uint256;
uint256 public totalSupply = 1000000000 * 10**uint256(decimals);
string public constant name = "FarmaTrust Token";
string public symbol = "FTT";
uint8 public constant decimals = 18;
mapping(address => uint256) public balances;
... | increaseApproval | function increaseApproval(address _spender, uint _addedValue)
public
returns (bool success)
{
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value, it is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://4b697d3aa64f916ecc42d2a9da9b72646beda153a58942612cd9cd6fca6f5004 | {
"func_code_index": [
9981,
10292
]
} | 5,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.