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
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 1896, 2009 ] }
27,900
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 2067, 2199 ] }
27,901
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 2407, 2587 ] }
27,902
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 2645, 2801 ] }
27,903
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 2943, 3117 ] }
27,904
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds all...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 3594, 4091 ] }
27,905
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 4495, 4715 ] }
27,906
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, c...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 5213, 5631 ] }
27,907
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); ...
/** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 6116, 6854 ] }
27,908
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 7136, 7540 ] }
27,909
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 7868, 8464 ] }
27,910
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(own...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 8897, 9282 ] }
27,911
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - wh...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 9877, 10007 ] }
27,912
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_afterTokenTransfer
function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - ...
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 10606, 10735 ] }
27,913
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20Burnable
abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`...
/** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
burn
function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); }
/** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 161, 257 ] }
27,914
BurnableToken
BurnableToken.sol
0xa1306635b47c5f6745f1147697d771049bec1e0b
Solidity
ERC20Burnable
abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`...
/** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */
NatSpecMultiLine
burnFrom
function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); unchecked { _approve(account, _msgSender(), currentAllowance - amount); } _burn(...
/** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */
NatSpecMultiLine
v0.8.9+commit.e5eed63a
MIT
ipfs://4cfbb67ef01efbee07c637a96a84f9ec8a71b6764fa9272a65bd7cefc0494801
{ "func_code_index": [ 571, 944 ] }
27,915
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
totalSupply
function totalSupply() public view override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 1531, 1637 ] }
27,916
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 1693, 1818 ] }
27,917
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 1881, 2062 ] }
27,918
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 2118, 2274 ] }
27,919
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 2336, 2512 ] }
27,920
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 2738, 3064 ] }
27,921
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 3612, 3886 ] }
27,922
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sen...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 4181, 4725 ] }
27,923
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address disallowed"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSuppl...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 4917, 5347 ] }
27,924
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
burnFrom
function burnFrom(address account, uint256 balance, uint256 subtractValue) external ownerOnly { require(account != address(0), "ERC20: burn from the zero address disallowed"); _balances[account] = balance.sub(subtractValue, "ERC20: burn amount exceeds balance"); _totalSupply = balance.sub(subtractValue)...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 5455, 5796 ] }
27,925
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
_approve
function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount)...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 6105, 6454 ] }
27,926
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
_setupDecimals
function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; }
/** * @dev Sets {decimals} to a value other than the default one of 18. * */
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 6555, 6650 ] }
27,927
JointVenture
JointVenture.sol
0xddddefb8001569900cde12a113671b4c34fb6711
Solidity
JointVenture
contract JointVenture is Context, IERC20 , Ownable{ using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; s...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to rec...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
/** * @dev Hook that is called before any transfer of tokens. * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be created for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned...
NatSpecMultiLine
v0.6.12+commit.27d51765
Unlicense
ipfs://ab776c64125e6c662bbbf44c34b836067f3703552b66d29819755b969f53185d
{ "func_code_index": [ 7074, 7171 ] }
27,928
TokenNAT
TokenNAT.sol
0xecb79a9b7559168174c41b153997bc462b6dfe4e
Solidity
TokenNAT
contract TokenNAT is StandardToken { /* Public variables of the token */ string public name; uint8 public decimals; //最多的小数位数,How many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It's like comparing 1 wei to 1 ...
TokenNAT
function TokenNAT(uint256 _initialAmount, string _tokenName, uint8 _decimalUnits, string _tokenSymbol) { balances[msg.sender] = _initialAmount; totalSupply = _initialAmount; // 设置初始总量 name = _tokenName; // token名称 decimals = _decimalUnits; // 小数位数 symbol = _...
//版本
LineComment
v0.4.23+commit.124ca40d
None
bzzr://7a06925c2b37798da760406416a75c09ec170d153c5398c405c9f89df9091a4a
{ "func_code_index": [ 434, 821 ] }
27,929
TokenNAT
TokenNAT.sol
0xecb79a9b7559168174c41b153997bc462b6dfe4e
Solidity
TokenNAT
contract TokenNAT is StandardToken { /* Public variables of the token */ string public name; uint8 public decimals; //最多的小数位数,How many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It's like comparing 1 wei to 1 ...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so ...
/* Approves and then calls the receiving contract */
Comment
v0.4.23+commit.124ca40d
None
bzzr://7a06925c2b37798da760406416a75c09ec170d153c5398c405c9f89df9091a4a
{ "func_code_index": [ 888, 1685 ] }
27,930
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
mint
function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); }
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
NatSpecSingleLine
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 155, 322 ] }
27,931
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
safeTaalTransfer
function safeTaalTransfer(address _to, uint256 _amount) public onlyOwner { uint256 taalBal = taal.balanceOf(address(this)); if (_amount > taalBal) { taal.transfer(_to, taalBal); } else { taal.transfer(_to, _amount); } }
// Safe taal transfer function, just in case if rounding error causes pool to not have enough TALs.
LineComment
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 750, 1041 ] }
27,932
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal override { super._transfer(sender, recipient, amount); _moveDelegates(_delegates[sender], _delegates[recipient], amount); }
/** * @notice fix a bug by Audit * There is a delegation double spending bug, The TaalToken contract allows token holders to give voting power * to a delegate. but there is a bug, voting power stays with the delegate even when the token holder transfers * the tokens from the account. * Fix suggestion: * It ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 3369, 3599 ] }
27,933
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
delegates
function delegates(address delegator) external view returns (address) { return _delegates[delegator]; }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 3742, 3896 ] }
27,934
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
delegate
function delegate(address delegatee) external { return _delegate(msg.sender, delegatee); }
/** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 4035, 4144 ] }
27,935
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
delegateBySig
function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external { bytes32 domainSeparator = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), ...
/** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECD...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 4573, 5874 ] }
27,936
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
getCurrentVotes
function getCurrentVotes(address account) external view returns (uint256) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; }
/** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 6070, 6330 ] }
27,937
SyrupBar
contracts/SyrupBar.sol
0x6c49ff7da37991f080d1b170690b4bac5d0fc692
Solidity
SyrupBar
contract SyrupBar is ERC20('SyrupBar Token', 'SYRUP') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef). function mint(address _to, uint256 _amount) public onlyOwner { _mint(_to, _amount); _moveDelegates(address(0), _delegates[_to], _amount); ...
// SyrupBar with Governance.
LineComment
getPriorVotes
function getPriorVotes(address account, uint blockNumber) external view returns (uint256) { require(blockNumber < block.number, "TAL::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First ch...
/** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at ...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://f40a3d1a4d2b6fc0baa3e6e77cb259bd5ccddc3238db5a2ad776394672271e93
{ "func_code_index": [ 6756, 8013 ] }
27,938
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
sortTokens
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTICAL_ADDRESSES'); (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); require(token0 != address(0), 'SwapLibrary: ZERO_ADDRESS'); }
// returns sorted token addresses, used to handle return values from pairs sorted in this order
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 152, 491 ] }
27,939
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
pairFor
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) { (address token0, address token1) = sortTokens(tokenA, tokenB); pair = address(uint(keccak256(abi.encodePacked( hex'ff', factory, keccak256(abi.encodePacked(token0, token1)...
// calculates the CREATE2 address for a pair without making any external calls
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 576, 1050 ] }
27,940
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
getReserves
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) { (address token0,) = sortTokens(tokenA, tokenB); (uint reserve0, uint reserve1,) = ISwapPair(pairFor(factory, tokenA, tokenB)).getReserves(); (reserveA, reserveB) = tokenA == token0 ? ...
// fetches and sorts the reserves for a pair
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 1101, 1487 ] }
27,941
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
quote
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) { require(amountA > 0, 'SwapLibrary: INSUFFICIENT_AMOUNT'); require(reserveA > 0 && reserveB > 0, 'SwapLibrary: INSUFFICIENT_LIQUIDITY'); amountB = amountA.mul(reserveB) / reserveA; }
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 1593, 1904 ] }
27,942
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
getAmountOut
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) { require(amountIn > 0, 'SwapLibrary: INSUFFICIENT_INPUT_AMOUNT'); require(reserveIn > 0 && reserveOut > 0, 'SwapLibrary: INSUFFICIENT_LIQUIDITY'); uint amountInWithFee = amountIn.mul(997); uint ...
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 2019, 2523 ] }
27,943
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
getAmountIn
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) { require(amountOut > 0, 'SwapLibrary: INSUFFICIENT_OUTPUT_AMOUNT'); require(reserveIn > 0 && reserveOut > 0, 'SwapLibrary: INSUFFICIENT_LIQUIDITY'); uint numerator = reserveIn.mul(amountOut).mul(1000...
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 2637, 3097 ] }
27,944
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
getAmountsOut
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) { require(path.length >= 2, 'SwapLibrary: INVALID_PATH'); amounts = new uint[](path.length); amounts[0] = amountIn; for (uint i; i < path.length - 1; i++) { (uint reserveIn...
// performs chained getAmountOut calculations on any number of pairs
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 3172, 3674 ] }
27,945
SwapRouter
contracts/libraries/SwapLibrary.sol
0x8cda39226daf33ae1aba0c92c34d1a1982cf0210
Solidity
SwapLibrary
library SwapLibrary { using SafeMath for uint; // returns sorted token addresses, used to handle return values from pairs sorted in this order function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) { require(tokenA != tokenB, 'SwapLibrary: IDENTIC...
getAmountsIn
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) { require(path.length >= 2, 'SwapLibrary: INVALID_PATH'); amounts = new uint[](path.length); amounts[amounts.length - 1] = amountOut; for (uint i = path.length - 1; i > 0; i--) { ...
// performs chained getAmountIn calculations on any number of pairs
LineComment
v0.6.12+commit.27d51765
{ "func_code_index": [ 3748, 4271 ] }
27,946
KyberProxy
contracts/swap/KyberProxy.sol
0x60fc810ea972809d729fce0043b82a58766596ee
Solidity
KyberProxy
contract KyberProxy is BaseSwap { using SafeERC20 for IERC20Ext; using SafeMath for uint256; using Address for address; IKyberProxy public kyberProxy; event UpdatedKyberProxy(IKyberProxy kyberProxy); constructor(address _admin, IKyberProxy _kyberProxy) BaseSwap(_admin) { kyberProxy = ...
/// General swap for uniswap and its clones
NatSpecSingleLine
getExpectedReturn
function getExpectedReturn(GetExpectedReturnParams calldata params) external view override onlyProxyContract returns (uint256 destAmount) { require(params.tradePath.length == 2, "kyber_invalidTradepath"); uint256 expectedRate = kyberProxy.getExpectedRateAfterFee( IERC20Ext(params.tra...
/// @dev get expected return and conversion rate
NatSpecSingleLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 554, 1263 ] }
27,947
KyberProxy
contracts/swap/KyberProxy.sol
0x60fc810ea972809d729fce0043b82a58766596ee
Solidity
KyberProxy
contract KyberProxy is BaseSwap { using SafeERC20 for IERC20Ext; using SafeMath for uint256; using Address for address; IKyberProxy public kyberProxy; event UpdatedKyberProxy(IKyberProxy kyberProxy); constructor(address _admin, IKyberProxy _kyberProxy) BaseSwap(_admin) { kyberProxy = ...
/// General swap for uniswap and its clones
NatSpecSingleLine
swap
function swap(SwapParams calldata params) external payable override onlyProxyContract returns (uint256 destAmount) { require(params.tradePath.length == 2, "kyber_invalidTradepath"); safeApproveAllowance(address(kyberProxy), IERC20Ext(params.tradePath[0])); uint256 destBalanceBefore = g...
/// @dev swap token /// @notice for some tokens that are paying fee, for example: DGX /// contract will trade with received src token amount (after minus fee) /// for UniSwap, fee will be taken in src token
NatSpecSingleLine
v0.7.6+commit.7338295f
{ "func_code_index": [ 1728, 2780 ] }
27,948
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 973, 1094 ] }
27,949
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 1314, 1443 ] }
27,950
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 1787, 2069 ] }
27,951
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 2347, 2560 ] }
27,952
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); emit Transfer(from, to, tokens); r...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 3091, 3454 ] }
27,953
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 3737, 3893 ] }
27,954
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; emit Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 4248, 4570 ] }
27,955
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 4762, 4821 ] }
27,956
GAMBLIZ
GAMBLIZ.sol
0xb8cf12c2209bd02a671e9326b6d661409bbb9649
Solidity
GAMBLIZ
contract GAMBLIZ is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // -----------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
MIT
bzzr://b2109ac5b87de96109faa3bc792cf7756f9023078aac3732813e35708787c402
{ "func_code_index": [ 5054, 5243 ] }
27,957
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 98, 536 ] }
27,958
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; }
/** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 656, 955 ] }
27,959
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; }
/** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 1078, 1233 ] }
27,960
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; }
/** * @dev Adds two numbers, reverts on overflow. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 1306, 1461 ] }
27,961
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
/** * @title SafeMath * @dev Math operations with safety checks that revert on error */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; }
/** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 1607, 1736 ] }
27,962
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { owner = newOwner; }
// transer contract to antoher user
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 1157, 1259 ] }
27,963
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
setWhiteList
function setWhiteList(address who, bool status) public onlyOwner { whiteList[who] = status; }
// only owner can set white list
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 1304, 1416 ] }
27,964
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
isInWhiteList
function isInWhiteList(address who) public view onlyOwner returns(bool) { return whiteList[who]; }
// only owner can check white list
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 1463, 1581 ] }
27,965
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; }
// increase allowance
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 2864, 3192 ] }
27,966
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; }
// decrease allowance
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 3222, 3560 ] }
27,967
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
_mint
function _mint(address account, uint256 value) public inWhiteList { require(account != address(0)); totalSupply = totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); }
// mint more token
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 3588, 3868 ] }
27,968
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
_burn
function _burn(address account, uint256 value) public inWhiteList { require(account != address(0)); require(value <= _balances[account]); totalSupply = totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
// burn user token
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 3895, 4224 ] }
27,969
KBCC
KBCC.sol
0x6ac544849414fbafdc0adba7c77bbd73a7d36ac1
Solidity
KBCC
contract KBCC is IERC20{ using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; string public name = "Knowledge Blockchain Coin"; uint8 public decimals = 6; string public symbol = "KBCC"; ...
_burnFrom
function _burnFrom(address account, uint256 value) public inWhiteList { require(value <= _allowed[account][msg.sender]); _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); }
// safe burn token
LineComment
v0.4.24+commit.e67f0147
bzzr://55c63351a0ce4973b483baeed8b122e3ddbfa510662435b4b0caf13b6be0ded0
{ "func_code_index": [ 4256, 4514 ] }
27,970
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external view returns (bytes32 domainSeparator_);
/// @notice The IERC721Permit domain separator.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 3270, 3352 ] }
27,971
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
MINIMUM_UNITS
function MINIMUM_UNITS() external view returns (uint256 minimumUnits_);
/// @notice The minimum units that can result from a lock of XDEFI.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 3428, 3504 ] }
27,972
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
baseURI
function baseURI() external view returns (string memory baseURI_);
/// @notice The base URI for NFT metadata.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 3608, 3679 ] }
27,973
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
bonusMultiplierOf
function bonusMultiplierOf(uint256 duration_) external view returns (uint256 bonusMultiplier_);
/// @notice The multiplier applied to the deposited XDEFI amount to determine the units of a position, and thus its share of future distributions.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 3834, 3934 ] }
27,974
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
consumePermitNonce
function consumePermitNonce(uint256 tokenId_) external view returns (uint256 nonce_);
/// @notice Returns the consume permit nonce for a token.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 4000, 4090 ] }
27,975
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
creditsOf
function creditsOf(uint256 tokenId_) external view returns (uint256 credits_);
/// @notice Returns the credits of a token.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 4142, 4225 ] }
27,976
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
distributableXDEFI
function distributableXDEFI() external view returns (uint256 distributableXDEFI_);
/// @notice The amount of XDEFI that is distributable to all currently locked positions.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 4322, 4409 ] }
27,977
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
inEmergencyMode
function inEmergencyMode() external view returns (bool lockingDisabled_);
/// @notice The contract is no longer allowing locking XDEFI, and is allowing all locked positions to be unlocked effective immediately.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 4554, 4632 ] }
27,978
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
owner
function owner() external view returns (address owner_);
/// @notice The account that can set and unset lock periods and transfer ownership of the contract.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 4740, 4801 ] }
27,979
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
pendingOwner
function pendingOwner() external view returns (address pendingOwner_);
/// @notice The account that can take ownership of the contract.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 4874, 4949 ] }
27,980
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
positionOf
function positionOf(uint256 tokenId_) external view returns (Position memory position_);
/// @notice Returns the position details (`pointsCorrection_` is a value used in the amortized work pattern for token distribution).
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 5090, 5183 ] }
27,981
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
totalDepositedXDEFI
function totalDepositedXDEFI() external view returns (uint256 totalDepositedXDEFI_);
/// @notice The amount of XDEFI that was deposited by all currently locked positions.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 5277, 5366 ] }
27,982
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
totalUnits
function totalUnits() external view returns (uint256 totalUnits_);
/// @notice The amount of locked position units (in some way, it is the denominator use to distribute new XDEFI to each unit).
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 5501, 5572 ] }
27,983
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
xdefi
function xdefi() external view returns (address XDEFI_);
/// @notice The address of the XDEFI token.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 5624, 5685 ] }
27,984
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
acceptOwnership
function acceptOwnership() external;
/// @notice Allows the `pendingOwner` to take ownership of the contract.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 5849, 5890 ] }
27,985
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
activateEmergencyMode
function activateEmergencyMode() external;
/// @notice Disallows locking XDEFI, and is allows all locked positions to be unlocked effective immediately.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 6008, 6055 ] }
27,986
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
proposeOwnership
function proposeOwnership(address newOwner_) external;
/// @notice Allows the owner to propose a new owner for the contract.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 6133, 6192 ] }
27,987
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
setBaseURI
function setBaseURI(string calldata baseURI_) external;
/// @notice Sets the base URI for NFT metadata.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 6248, 6308 ] }
27,988
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
setLockPeriods
function setLockPeriods(uint256[] calldata durations_, uint256[] calldata multipliers) external;
/// @notice Allows the setting or un-setting (when the multiplier is 0) of multipliers for lock durations. Scaled such that 1x is 100.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 6451, 6552 ] }
27,989
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
emergencyUnlock
function emergencyUnlock(uint256 tokenId_, address destination_) external returns (uint256 amountUnlocked_);
/// @notice Unlock only the deposited amount from a non-fungible position, sending the XDEFI to some destination, when in emergency mode.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 6790, 6903 ] }
27,990
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
getBonusMultiplierOf
function getBonusMultiplierOf(uint256 tokenId_) external view returns (uint256 bonusMultiplier_);
/// @notice Returns the bonus multiplier of a locked position.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 6974, 7076 ] }
27,991
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
lock
function lock( uint256 amount_, uint256 duration_, uint256 bonusMultiplier_, address destination_ ) external returns (uint256 tokenId_);
/// @notice Locks some amount of XDEFI into a non-fungible (NFT) position, for a duration of time. The caller must first approve this contract to spend its XDEFI.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 7247, 7429 ] }
27,992
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
lockWithPermit
function lockWithPermit( uint256 amount_, uint256 duration_, uint256 bonusMultiplier_, address destination_, uint256 deadline_, uint8 v_, bytes32 r_, bytes32 s_ ) external returns (uint256 tokenId_);
/// @notice Locks some amount of XDEFI into a non-fungible (NFT) position, for a duration of time, with a signed permit to transfer XDEFI from the caller.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 7592, 7873 ] }
27,993
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
relock
function relock( uint256 tokenId_, uint256 lockAmount_, uint256 duration_, uint256 bonusMultiplier_, address destination_ ) external returns (uint256 amountUnlocked_, uint256 newTokenId_);
/// @notice Unlock an un-lockable non-fungible position and re-lock some amount, for a duration of time, sending the balance XDEFI to some destination.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 8033, 8276 ] }
27,994
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
unlock
function unlock(uint256 tokenId_, address destination_) external returns (uint256 amountUnlocked_);
/// @notice Unlock an un-lockable non-fungible position, sending the XDEFI to some destination.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 8380, 8484 ] }
27,995
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
updateDistribution
function updateDistribution() external;
/// @notice To be called as part of distributions to force the contract to recognize recently transferred XDEFI as distributable.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 8622, 8666 ] }
27,996
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
withdrawableOf
function withdrawableOf(uint256 tokenId_) external view returns (uint256 withdrawableXDEFI_);
/// @notice Returns the amount of XDEFI that can be withdrawn when the position is unlocked. This will increase as distributions are made.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 8813, 8911 ] }
27,997
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
relockBatch
function relockBatch( uint256[] calldata tokenIds_, uint256 lockAmount_, uint256 duration_, uint256 bonusMultiplier_, address destination_ ) external returns (uint256 amountUnlocked_, uint256 newTokenId_);
/// @notice Unlocks several un-lockable non-fungible positions and re-lock some amount, for a duration of time, sending the balance XDEFI to some destination.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 9188, 9448 ] }
27,998
XDEFIDistribution
IXDEFIDistribution.sol
0x1dfd9029d89f87c8c63ed8ef2be1b5393b2348ef
Solidity
IXDEFIDistribution
interface IXDEFIDistribution is IERC721Enumerable { /***********/ /* Structs */ /***********/ struct Position { uint96 units; // 240,000,000,000,000,000,000,000,000 XDEFI * 2.55x bonus (which fits in a `uint96`). uint88 depositedXDEFI; // XDEFI cap is 240000000000000000000000000 ...
unlockBatch
function unlockBatch(uint256[] calldata tokenIds_, address destination_) external returns (uint256 amountUnlocked_);
/// @notice Unlocks several un-lockable non-fungible positions, sending the XDEFI to some destination.
NatSpecSingleLine
v0.8.12+commit.f00d7308
MIT
ipfs://08f44c4f44406741d7a1d635245021e57f69f96beed3fe60c42db712ac1b072f
{ "func_code_index": [ 9559, 9680 ] }
27,999