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
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 1603, 1717 ] }
2,600
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
Ownable
contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSend...
_transferOwnership
function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 1818, 2052 ] }
2,601
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
Pausable
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } /** * @return True if the contract is paused, false otherwise. */ function paused() public vi...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
paused
function paused() public view returns (bool) { return _paused; }
/** * @return True if the contract is paused, false otherwise. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 289, 372 ] }
2,602
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
Pausable
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } /** * @return True if the contract is paused, false otherwise. */ function paused() public vi...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
pause
function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); }
/** * @dev Called by a pauser to pause, triggers stopped state. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 825, 946 ] }
2,603
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
Pausable
contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } /** * @return True if the contract is paused, false otherwise. */ function paused() public vi...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
unpause
function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(msg.sender); }
/** * @dev Called by a pauser to unpause, returns to normal state. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 1036, 1159 ] }
2,604
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
Lockable
contract Lockable is PauserRole{ mapping (address => bool) private lockers; event LockAccount(address account, bool islock); /** * @dev Check if the account is locked. * @param account specific account address. */ function isLock(address account) public ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
isLock
function isLock(address account) public view returns (bool) { return lockers[account]; }
/** * @dev Check if the account is locked. * @param account specific account address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 276, 383 ] }
2,605
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
Lockable
contract Lockable is PauserRole{ mapping (address => bool) private lockers; event LockAccount(address account, bool islock); /** * @dev Check if the account is locked. * @param account specific account address. */ function isLock(address account) public ...
/** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */
NatSpecMultiLine
lock
function lock(address account, bool islock) public onlyPauser { lockers[account] = islock; emit LockAccount(account, islock); }
/** * @dev Lock or thaw account address * @param account specific account address. * @param islock true lock, false thaw. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 544, 700 ] }
2,606
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
HooToken
contract HooToken is ERC20, ERC20Detailed, ERC20Pausable, Ownable { // metadata string public constant tokenName = "HooToken"; string public constant tokenSymbol = "HOO"; uint8 public constant decimalUnits = 8; uint256 public constant initialSupply = 1000000000; // address private _owner; ...
burn
function burn(uint256 value) public whenNotPaused { require(!isLock(msg.sender)); _burn(msg.sender, value); }
/** * @dev Burns a specific amount of tokens. * @param value The amount of token to be burned. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 839, 976 ] }
2,607
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
HooToken
contract HooToken is ERC20, ERC20Detailed, ERC20Pausable, Ownable { // metadata string public constant tokenName = "HooToken"; string public constant tokenSymbol = "HOO"; uint8 public constant decimalUnits = 8; uint256 public constant initialSupply = 1000000000; // address private _owner; ...
freeze
function freeze(uint256 value) public whenNotPaused { require(!isLock(msg.sender)); _freeze(value); }
/** * @dev Freeze a specific amount of tokens. * @param value The amount of token to be Freeze. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 1105, 1234 ] }
2,608
HooToken
HooToken.sol
0xaa52c04c7b18c2ebdba34627bde40c0bf241065c
Solidity
HooToken
contract HooToken is ERC20, ERC20Detailed, ERC20Pausable, Ownable { // metadata string public constant tokenName = "HooToken"; string public constant tokenSymbol = "HOO"; uint8 public constant decimalUnits = 8; uint256 public constant initialSupply = 1000000000; // address private _owner; ...
unfreeze
function unfreeze(uint256 value) public whenNotPaused { require(!isLock(msg.sender)); _unfreeze(value); }
/** * @dev unFreeze a specific amount of tokens. * @param value The amount of token to be unFreeze. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://5557e44db2bc84bd03fea4f1d2b0b06530c4cdb00ab9534e3b33839b7d78bfff
{ "func_code_index": [ 1371, 1504 ] }
2,609
PAaveIntegration
contracts/peripheral/Aave/IAaveIncentivesController.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
IAaveIncentivesController
interface IAaveIncentivesController { /** * @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards * @param amount Amount of rewards to claim * @param to Address that will be receiving the rewards * @return Rewards claimed **/ function cl...
claimRewards
function claimRewards( address[] calldata assets, uint256 amount, address to ) external returns (uint256);
/** * @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards * @param amount Amount of rewards to claim * @param to Address that will be receiving the rewards * @return Rewards claimed **/
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 305, 443 ] }
2,610
PAaveIntegration
contracts/peripheral/Aave/IAaveIncentivesController.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
IAaveIncentivesController
interface IAaveIncentivesController { /** * @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards * @param amount Amount of rewards to claim * @param to Address that will be receiving the rewards * @return Rewards claimed **/ function cl...
getRewardsBalance
function getRewardsBalance(address[] calldata assets, address user) external view returns (uint256);
/** * @dev Returns the total of rewards of an user, already accrued + not yet accrued * @param user The address of the user * @return The rewards **/
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 619, 747 ] }
2,611
PAaveIntegration
contracts/peripheral/Aave/IAaveIncentivesController.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
IAaveIncentivesController
interface IAaveIncentivesController { /** * @dev Claims reward for an user, on all the assets of the lending pool, accumulating the pending rewards * @param amount Amount of rewards to claim * @param to Address that will be receiving the rewards * @return Rewards claimed **/ function cl...
getUserUnclaimedRewards
function getUserUnclaimedRewards(address user) external view returns (uint256);
/** * @dev returns the unclaimed rewards of the user * @param user the address of the user * @return the unclaimed user rewards */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 904, 987 ] }
2,612
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
setManagementFee
function setManagementFee(uint256 newManagementFee) external onlyRole(DEFAULT_ADMIN_ROLE) { require(newManagementFee < FEE_DENOMINATOR, 'Zunami: wrong fee'); managementFee = newManagementFee; }
/** * @dev update managementFee, this is a Zunami commission from protocol profit * @param newManagementFee - minAmount 0, maxAmount FEE_DENOMINATOR - 1 */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 3914, 4131 ] }
2,613
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
calcManagementFee
function calcManagementFee(uint256 amount) external view returns (uint256) { return (amount * managementFee) / FEE_DENOMINATOR; }
/** * @dev Returns managementFee for strategy's when contract sell rewards * @return Returns commission on the amount of profit in the transaction * @param amount - amount of profit for calculate managementFee */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 4370, 4515 ] }
2,614
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
claimAllManagementFee
function claimAllManagementFee() external { uint256 feeTotalValue; for (uint256 i = 0; i < _poolInfo.length; i++) { feeTotalValue += _poolInfo[i].strategy.claimManagementFees(); } emit ClaimedAllManagementFee(feeTotalValue); }
/** * @dev Claims managementFee from all active strategies */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 4593, 4872 ] }
2,615
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
totalHoldings
function totalHoldings() public view returns (uint256) { uint256 length = _poolInfo.length; uint256 totalHold = 0; for (uint256 pid = 0; pid < length; pid++) { totalHold += _poolInfo[pid].strategy.totalHoldings(); } return totalHold; }
/** * @dev Returns total holdings for all pools (strategy's) * @return Returns sum holdings (USD) for all pools */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 5206, 5501 ] }
2,616
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
lpPrice
function lpPrice() external view returns (uint256) { return (totalHoldings() * 1e18) / totalSupply(); }
/** * @dev Returns price depends on the income of users * @return Returns currently price of ZLP (1e18 = 1$) */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 5634, 5753 ] }
2,617
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
poolCount
function poolCount() external view returns (uint256) { return _poolInfo.length; }
/** * @dev Returns number of pools * @return number of pools */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 5838, 5935 ] }
2,618
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
delegateDeposit
function delegateDeposit(uint256[3] memory amounts) external whenNotPaused { for (uint256 i = 0; i < amounts.length; i++) { if (amounts[i] > 0) { IERC20Metadata(tokens[i]).safeTransferFrom(_msgSender(), address(this), amounts[i]); pendingDeposits[_msgSender()][i] += amounts[i]; ...
/** * @dev in this func user sends funds to the contract and then waits for the completion * of the transaction for all users * @param amounts - array of deposit amounts by user */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 6142, 6566 ] }
2,619
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
delegateWithdrawal
function delegateWithdrawal(uint256 lpAmount, uint256[3] memory minAmounts) external whenNotPaused { PendingWithdrawal memory withdrawal; address userAddr = _msgSender(); require(lpAmount > 0, 'Zunami: lpAmount must be higher 0'); withdrawal.lpShares = lpAmount; withdrawal.minAmounts = minA...
/** * @dev in this func user sends pending withdraw to the contract and then waits * for the completion of the transaction for all users * @param lpAmount - amount of ZLP for withdraw * @param minAmounts - array of amounts stablecoins that user want minimum receive */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 6867, 7360 ] }
2,620
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
completeDeposits
function completeDeposits(address[] memory userList) external onlyRole(OPERATOR_ROLE) startedPool { IStrategy strategy = _poolInfo[defaultDepositPid].strategy; uint256 currentTotalHoldings = totalHoldings(); uint256 newHoldings = 0; uint256[3] memory totalAmounts; uint256[] memory userC...
/** * @dev Zunami protocol owner complete all active pending deposits of users * @param userList - dev send array of users from pending to complete */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 7532, 9741 ] }
2,621
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
completeWithdrawals
function completeWithdrawals(address[] memory userList) external onlyRole(OPERATOR_ROLE) startedPool { require(userList.length > 0, 'Zunami: there are no pending withdrawals requests'); IStrategy strategy = _poolInfo[defaultWithdrawPid].strategy; address user; PendingWithdrawal memory with...
/** * @dev Zunami protocol owner complete all active pending withdrawals of users * @param userList - array of users from pending withdraw to complete */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 9916, 11561 ] }
2,622
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
deposit
function deposit(uint256[POOL_ASSETS] memory amounts) external whenNotPaused startedPool returns (uint256) { IStrategy strategy = _poolInfo[defaultDepositPid].strategy; uint256 holdings = totalHoldings(); for (uint256 i = 0; i < amounts.length; i++) { if (amounts[i] > 0) { ...
/** * @dev deposit in one tx, without waiting complete by dev * @return Returns amount of lpShares minted for user * @param amounts - user send amounts of stablecoins to deposit */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 14700, 15800 ] }
2,623
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
withdraw
function withdraw( uint256 lpShares, uint256[POOL_ASSETS] memory tokenAmounts, IStrategy.WithdrawalType withdrawalType, uint128 tokenIndex ) external whenNotPaused startedPool { require( checkBit(availableWithdrawalTypes, uint8(withdrawalType)), 'Zunami: withdrawal type not available' ); IStrate...
/** * @dev withdraw in one tx, without waiting complete by dev * @param lpShares - amount of ZLP for withdraw * @param tokenAmounts - array of amounts stablecoins that user want minimum receive */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 16024, 17092 ] }
2,624
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
addPool
function addPool(address _strategyAddr) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_strategyAddr != address(0), 'Zunami: zero strategy addr'); uint256 startTime = block.timestamp + (launched ? MIN_LOCK_TIME : 0); _poolInfo.push( PoolInfo({ strategy: IStrategy(_strategyAddr), startTime: startTim...
/** * @dev add a new pool, deposits in the new pool are blocked for one day for safety * @param _strategyAddr - the new pool strategy address */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 17259, 17705 ] }
2,625
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
setDefaultDepositPid
function setDefaultDepositPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_newPoolId < _poolInfo.length, 'Zunami: incorrect default deposit pool id'); defaultDepositPid = _newPoolId; emit SetDefaultDepositPid(_newPoolId); }
/** * @dev set a default pool for deposit funds * @param _newPoolId - new pool id */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 17811, 18091 ] }
2,626
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
setDefaultWithdrawPid
function setDefaultWithdrawPid(uint256 _newPoolId) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_newPoolId < _poolInfo.length, 'Zunami: incorrect default withdraw pool id'); defaultWithdrawPid = _newPoolId; emit SetDefaultWithdrawPid(_newPoolId); }
/** * @dev set a default pool for withdraw funds * @param _newPoolId - new pool id */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 18198, 18482 ] }
2,627
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
moveFundsBatch
function moveFundsBatch( uint256[] memory _strategies, uint256[] memory withdrawalsPercents, uint256 _receiverStrategyId ) external onlyRole(DEFAULT_ADMIN_ROLE) { require( _strategies.length == withdrawalsPercents.length, 'Zunami: incorrect arguments for the moveFundsBatch' ); re...
/** * @dev dev can transfer funds from few strategy's to one strategy for better APY * @param _strategies - array of strategy's, from which funds are withdrawn * @param withdrawalsPercents - A percentage of the funds that should be transfered * @param _receiverStrategyId - number strategy, to which funds are deposi...
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 18930, 20498 ] }
2,628
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
pendingDepositRemove
function pendingDepositRemove() external { for (uint256 i = 0; i < POOL_ASSETS; i++) { if (pendingDeposits[_msgSender()][i] > 0) { IERC20Metadata(tokens[i]).safeTransfer( _msgSender(), pendingDeposits[_msgSender()][i] ); } } delete pend...
/** * @dev user remove his active pending deposit */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 21435, 21827 ] }
2,629
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
withdrawStuckToken
function withdrawStuckToken(IERC20Metadata _token) external onlyRole(DEFAULT_ADMIN_ROLE) { uint256 tokenBalance = _token.balanceOf(address(this)); _token.safeTransfer(_msgSender(), tokenBalance); }
/** * @dev governance can withdraw all stuck funds in emergency case * @param _token - IERC20Metadata token that should be fully withdraw from Zunami */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 22001, 22222 ] }
2,630
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
updateOperator
function updateOperator(address _newOperator) external onlyRole(DEFAULT_ADMIN_ROLE) { _grantRole(OPERATOR_ROLE, _newOperator); }
/** * @dev governance can add new operator for complete pending deposits and withdrawals * @param _newOperator - address that governance add in list of operators */
NatSpecMultiLine
v0.8.12+commit.f00d7308
{ "func_code_index": [ 22408, 22552 ] }
2,631
Zunami
contracts/Zunami.sol
0x9b43e47bec96a9345cd26fdde7efa5f8c06e126c
Solidity
Zunami
contract Zunami is ERC20, Pausable, AccessControl { using SafeERC20 for IERC20Metadata; bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); struct PendingWithdrawal { uint256 lpShares; uint256[3] minAmounts; } struct PoolInfo { IStrategy strategy; u...
/** * * @title Zunami Protocol * * @notice Contract for Convex&Curve protocols optimize. * Users can use this contract for optimize yield and gas. * * * @dev Zunami is main contract. * Contract does not store user funds. * All user funds goes to Convex&Curve pools. * */
NatSpecMultiLine
checkBit
function checkBit(uint8 mask, uint8 bit) internal pure returns (bool) { return mask & (0x01 << bit) != 0; }
// Get bit value at position
LineComment
v0.8.12+commit.f00d7308
{ "func_code_index": [ 22587, 22710 ] }
2,632
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 605, 834 ] }
2,633
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenOfOwnerByIndex
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; }
/** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 913, 1174 ] }
2,634
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; }
/** * @dev See {IERC721Enumerable-totalSupply}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 1245, 1363 ] }
2,635
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
tokenByIndex
function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; }
/** * @dev See {IERC721Enumerable-tokenByIndex}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 1435, 1673 ] }
2,636
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnume...
/** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 2281, 2875 ] }
2,637
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToOwnerEnumeration
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; }
/** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 3171, 3397 ] }
2,638
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_addTokenToAllTokensEnumeration
function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); }
/** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 3593, 3762 ] }
2,639
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromOwnerEnumeration
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 ...
/** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes)....
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 4384, 5377 ] }
2,640
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
ERC721Enumerable
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex;...
/** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */
NatSpecMultiLine
_removeTokenFromAllTokensEnumeration
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allT...
/** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 5667, 6751 ] }
2,641
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
StickFighter
contract StickFighter is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters total max supply = totalcount - 1 uint256 public totalMints; uint256 public totalCount = 10001; //Max mints per bat...
_baseURI
function _baseURI() internal view virtual override returns (string memory){ return baseURI; }
//basic functions.
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 1127, 1239 ] }
2,642
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
StickFighter
contract StickFighter is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters total max supply = totalcount - 1 uint256 public totalMints; uint256 public totalCount = 10001; //Max mints per bat...
tokenURI
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token."); string memory baseURI2 = _baseURI(); return bytes(baseURI2).length > 0 ? string(abi.encodePacked(baseURI2, tokenId.toString()...
//Returns a tokenURI of a specific token
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 1390, 1760 ] }
2,643
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
StickFighter
contract StickFighter is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters total max supply = totalcount - 1 uint256 public totalMints; uint256 public totalCount = 10001; //Max mints per bat...
setSaleActive
function setSaleActive(bool _start) public onlyOwner { saleActive = _start; }
//Function to activate or deactivate the sale
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 1814, 1910 ] }
2,644
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
StickFighter
contract StickFighter is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters total max supply = totalcount - 1 uint256 public totalMints; uint256 public totalCount = 10001; //Max mints per bat...
setPresaleActive
function setPresaleActive(bool _start) public onlyOwner { presaleActive = _start; }
//Function to activate or deactivate the presale
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 1967, 2069 ] }
2,645
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
StickFighter
contract StickFighter is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters total max supply = totalcount - 1 uint256 public totalMints; uint256 public totalCount = 10001; //Max mints per bat...
mintPresaleToken
function mintPresaleToken(uint16 _amount) public payable { require( presaleActive, "Presale is not active" ); uint16 reservedAmt = presaleAddresses[msg.sender]; require( reservedAmt > 0, "No tokens reserved for your address" ); require( _amount < reservedAmt, ...
//Exclusive Presale mint for the OG's || Moet nog testen of het goe dgaat met de total suplly
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 2531, 3267 ] }
2,646
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
StickFighter
contract StickFighter is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters total max supply = totalcount - 1 uint256 public totalMints; uint256 public totalCount = 10001; //Max mints per bat...
mint
function mint(uint16 _amount) public payable { require( saleActive,"Sale is not active" ); require( _amount < maxBatch, "You can only Mint 10 tokens at once" ); require( totalMints + _amount < totalCount,"Cannot mint more than max supply" ); require( msg.value == price * _amount,"Wrong amount of ETH...
//Mint function
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 3291, 3755 ] }
2,647
StickFighter
@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol
0x9b121e19fc09b777ffa6fbd58ab980d1cf0503c4
Solidity
StickFighter
contract StickFighter is ERC721Enumerable, Ownable { using Strings for uint256; event Mint(address indexed sender, uint256 startWith, uint256 times); //supply counters total max supply = totalcount - 1 uint256 public totalMints; uint256 public totalCount = 10001; //Max mints per bat...
setPresaleReservedAddresses
function setPresaleReservedAddresses(address[] memory _a, uint16[] memory _amount) public onlyOwner { uint16 length = uint16(_a.length); for(uint16 i; i < length; i++){ presaleAddresses[_a[i]] = _amount[i]; } }
//Set reserved presale spots for OG's
LineComment
v0.8.7+commit.e28d00a7
MIT
ipfs://5e5e7855cd66c8862cb436fbe3015780c3301ca66101dc7cadb46ef4ed076abe
{ "func_code_index": [ 3801, 4061 ] }
2,648
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
ArticCoin
function ArticCoin( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = 10000000000000000000000000 * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = 10000000000000000000000000; // Give the creator ...
/** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 861, 1429 ] }
2,649
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
_transfer
function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to])...
/** * Internal transfer, only can be called by this contract */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 1513, 2355 ] }
2,650
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
transfer
function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); }
/** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 2561, 2673 ] }
2,651
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; }
/** * Transfer tokens from other address * * Send `_value` tokens to `_to` on behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 2948, 3249 ] }
2,652
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
approve
function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; }
/** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens on your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 3513, 3689 ] }
2,653
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
approveAndCall
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } }
/** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens on your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to s...
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 4083, 4435 ] }
2,654
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
burn
function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _val...
/** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 4605, 4979 ] }
2,655
ArticCoin
ArticCoin.sol
0x10a0f62ee681d9267229db60031b58c484099f1b
Solidity
ArticCoin
contract ArticCoin { // Public variables of the token string public name = "ArticCoin"; string public symbol = "ART"; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balance...
burnFrom
function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Sub...
/** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */
NatSpecMultiLine
v0.4.20+commit.3155dd80
bzzr://af44b56a8e0e5bcf8b02875b79a32237ec64c94fbc9d35451128d56f2901577e
{ "func_code_index": [ 5237, 5848 ] }
2,656
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
notifyPools
function notifyPools(uint256 total, uint256 timestamp) public onlyNotifier { // transfer the tokens from the msg.sender to here IERC20(farm).safeTransferFrom(msg.sender, address(this), total); // prepare the notification data WorkingNotification memory iFARM = WorkingNotification( new address[](numbers[uin...
/// Whitelisted entities can notify pools based on the state, both for FARM and iFARM /// The only whitelisted entity here would be the minter helper
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 2169, 5275 ] }
2,657
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
transferGovernance
function transferGovernance(address target, address newStorage) external onlyGovernance { Governable(target).setStorage(newStorage); }
/// Returning the governance
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 5308, 5450 ] }
2,658
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
setChanger
function setChanger(address who, bool value) external onlyGovernance { changer[who] = value; emit ChangerSet(who, value); }
/// The governance configures whitelists
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 5495, 5630 ] }
2,659
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
setNotifier
function setNotifier(address who, bool value) external onlyGovernance { notifier[who] = value; emit NotifierSet(who, value); }
/// The governance configures whitelists
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 5675, 5813 ] }
2,660
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
setPoolBatch
function setPoolBatch(address[] calldata poolAddress, uint256[] calldata poolPercentage, NotificationType[] calldata notificationType, bool[] calldata vests) external onlyChanger { for (uint256 i = 0; i < poolAddress.length; i++) { setPool(poolAddress[i], poolPercentage[i], notificationType[i], vests[i]); } }
/// Whitelisted entity makes changes to the notifications
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 5875, 6203 ] }
2,661
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
setPool
function setPool(address poolAddress, uint256 poolPercentage, NotificationType notificationType, bool vests) public onlyChanger { require(notificationType != NotificationType.VOID, "Use valid indication"); if (notificationExists(poolAddress) && poolPercentage == 0) { // remove removeNotification(poolAddress...
/// Pool management, adds, updates or removes a transfer/notification
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 6277, 7003 ] }
2,662
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
setVestingEscrow
function setVestingEscrow(address _escrow) external onlyGovernance { vestingEscrow = _escrow; }
/// Configuration method for vesting for governance
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 7059, 7162 ] }
2,663
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
setVesting
function setVesting(uint256 _numerator, uint256 _denominator) external onlyGovernance { VESTING_DENOMINATOR = _numerator; VESTING_NUMERATOR = _denominator; }
/// Configuration method for vesting for governance
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 7218, 7387 ] }
2,664
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
emergencyDrain
function emergencyDrain(address token, uint256 amount) public onlyGovernance { if (token == address(0)) { msg.sender.transfer(amount); } else { IERC20(token).safeTransfer(msg.sender, amount); } }
/// emergency draining of tokens and ETH as there should be none staying here
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 10272, 10495 ] }
2,665
NotifyHelperStateful
contracts/NotifyHelperStateful.sol
0x71316a3465e0fbcd08e665d6675caa8f7b1dd40a
Solidity
NotifyHelperStateful
contract NotifyHelperStateful is Controllable { using SafeMath for uint256; using SafeERC20 for IERC20; event ChangerSet(address indexed account, bool value); event NotifierSet(address indexed account, bool value); event Vesting(address pool, uint256 amount); event PoolChanged(address indexed pool, uint25...
getConfig
function getConfig(uint256 totalAmount) external view returns(address[] memory, uint256[] memory, uint256[] memory) { address[] memory pools = new address[](notifications.length); uint256[] memory percentages = new uint256[](notifications.length); uint256[] memory amounts = new uint256[](notifications.length); ...
/// configuration check method
NatSpecSingleLine
v0.5.16+commit.9c3226ce
{ "func_code_index": [ 10530, 11231 ] }
2,666
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
setPboy
function setPboy(address PBOY) public { require(msg.sender == ADDRESS_PBOY, "error msg.sender"); ADDRESS_PBOY = PBOY; emit Shareholder(SHARE_PBOY, ADDRESS_PBOY); }
/// @notice Allow Pboy to modify ADDRESS_PBOY /// This function is dedicated to the represented shareholder according to require().
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 3575, 3780 ] }
2,667
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
setJolan
function setJolan(address JOLAN) public { require(msg.sender == ADDRESS_JOLAN, "error msg.sender"); ADDRESS_JOLAN = JOLAN; emit Shareholder(SHARE_JOLAN, ADDRESS_JOLAN); }
/// @notice Allow Jolan to modify ADDRESS_JOLAN /// This function is dedicated to the represented shareholder according to require().
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 3935, 4147 ] }
2,668
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
withdrawEquity
function withdrawEquity() public onlyOwner nonReentrant { uint256 balance = address(this).balance; address[2] memory shareholders = [ ADDRESS_PBOY, ADDRESS_JOLAN ]; uint256[2] memory _shares = [ SHARE_PBOY * balance / 100, SHARE_JOLAN * balance / 100 ]; ...
/// @notice Used to withdraw ETH balance of the contract, this function is dedicated /// to contract owner according to { onlyOwner } modifier.
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 4312, 4882 ] }
2,669
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
genesisController
function genesisController(uint256 _genesisId) private { require(epoch == 0, "error epoch"); require(genesisId <= maxGenesisSupply, "error genesisId"); require(!epochMintingRegistry[epoch][_genesisId], "error epochMintingRegistry"); /// @dev Set { _genesisId } for { epoch } as true epochMint...
/// @notice Used to manage authorization and reentrancy of the genesis NFT mint /// @param _genesisId Used to increment { genesisId } and write { epochMintingRegistry }
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 5144, 6309 ] }
2,670
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
generationController
function generationController(uint256 _genesisId) private { require(blockGenesis > 0, "error blockGenesis"); require(blockMeta > 0, "error blockMeta"); require(blockOmega > 0, "error blockOmega"); /// @dev If { block.number } >= { blockMeta } the function /// will compute the data to in...
/// @notice Used to manage authorization and reentrancy of the Generation NFT mint /// @param _genesisId Used to write { epochMintingRegistry } and verify minting allowance
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 6496, 8757 ] }
2,671
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
emergencySecure
function emergencySecure(uint256 _epoch, uint256 _epochLen, uint256 _blockMeta, uint256 _inflateRatio) public onlyOwner { require(epoch > 0, "error epoch"); require(_epoch > 0, "error _epoch"); require(maxTokenSupply >= tokenId, "error maxTokenSupply"); epoch = _epoch; epochLen = _epochLen; ...
/// @notice Used to protect epoch block length from difficulty bomb of the /// Ethereum network. A difficulty bomb heavily increases the difficulty /// on the network, likely also causing an increase in block time. /// If the block time increases too much, the epoch generation could become /// ...
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 9641, 10167 ] }
2,672
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
computeBlockOmega
function computeBlockOmega() private { uint256 i = 0; uint256 _blockMeta = 0; uint256 _epochLen = epochLen; while (i < epochMax) { if (i > 0) _epochLen *= inflateRatio; if (i == 9) { blockOmega = blockGenesis + _blockMeta; emit Omega(blockOmega); ...
/// @notice Used to compute blockOmega() function, { blockOmega } represents /// the block when it won't ever be possible to mint another Dollars Nakamoto NFT. /// It is possible to be computed because of the deterministic state of the current protocol /// The following algorithm simulate the 10...
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 10573, 11040 ] }
2,673
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
epochRegulator
function epochRegulator() private { if (epoch == 0) computeBlockOmega(); if (epoch > 0) epochLen *= inflateRatio; blockMeta += epochLen; emit Meta(epoch, blockMeta); epoch++; if (block.number >= blockMeta && epoch < epochMax) { epochRegulator(); } ...
/// @notice Used to regulate the epoch incrementation and block computation, known as Metas /// @dev When epoch=0, the { blockOmega } will be computed /// When epoch!=0 the block length { epochLen } will be multiplied /// by { inflateRatio } thus making the block length required for each /// epoch longer...
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 11557, 11960 ] }
2,674
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
setBatchGenesisAllowance
function setBatchGenesisAllowance(address[] memory batch) public onlyOwner { uint len = batch.length; require(len > 0, "error len"); uint i = 0; while (i < len) { _allowList[batch[i]] = _allowList[batch[i]] ? false : true; i++; } }
/// @notice Used to add/remove address from { _allowList }
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 12106, 12446 ] }
2,675
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
transferListSlot
function transferListSlot(address to) public { require(epoch == 0, "error epoch"); require(_allowList[msg.sender], "error msg.sender"); require(!_allowList[to], "error to"); _allowList[msg.sender] = false; _allowList[to] = true; }
/// @notice Used to transfer { _allowList } slot to another address
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 12522, 12812 ] }
2,676
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
setGenesisMint
function setGenesisMint() public onlyOwner { genesisMintAllowed = true; }
/// @notice Used to open the mint of Genesis NFT
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 12869, 12966 ] }
2,677
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
giftGenesis
function giftGenesis(address to) public onlyOwner { uint256 _genesisId = ++genesisId; setMetadata(tokenId, _genesisId, epoch); genesisController(_genesisId); mintUSDSat(to, tokenId++); }
/// @notice Used to gift Genesis NFT, this function is dedicated /// to contract owner according to { onlyOwner } modifier
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 13110, 13347 ] }
2,678
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
mintGenesis
function mintGenesis() public payable { uint256 _genesisId = ++genesisId; setMetadata(tokenId, _genesisId, epoch); genesisController(_genesisId); require(genesisMintAllowed, "error genesisMintAllowed"); require(_allowList[msg.sender], "error allowList"); require(genesisPrice == msg.value...
/// @notice Used to mint Genesis NFT, this function is payable /// the price of this function is equal to { genesisPrice }, /// require to be present on { _allowList } to call
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 13557, 14028 ] }
2,679
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
giftGenerations
function giftGenerations(uint256 _genesisId, address to) public { ++generationId; generationController(_genesisId); setMetadata(tokenId, _genesisId, epoch); mintUSDSat(to, tokenId++); }
/// @notice Used to gift Generation NFT, you need a Genesis NFT to call this function
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 14122, 14359 ] }
2,680
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
mintGenerations
function mintGenerations(uint256 _genesisId) public { ++generationId; generationController(_genesisId); setMetadata(tokenId, _genesisId, epoch); mintUSDSat(msg.sender, tokenId++); }
/// @notice Used to mint Generation NFT, you need a Genesis NFT to call this function
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 14453, 14685 ] }
2,681
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
mintUSDSat
function mintUSDSat(address to, uint256 _tokenId) private { emit PermanentURI(_compileMetadata(_tokenId), _tokenId); _safeMint(ADDRESS_SIGN, _tokenId); emit Signed(epoch, _tokenId, block.number); _safeTransfer(ADDRESS_SIGN, to, _tokenId, ""); emit Minted(epoch, _tokenId, to); }
/// @notice Token is minted on { ADDRESS_SIGN } and instantly transferred to { msg.sender } as { to }, /// this is to ensure the token creation is signed with { ADDRESS_SIGN } /// This function is private and can be only called by the contract
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 14963, 15301 ] }
2,682
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
setContractCID
function setContractCID(string memory CID) public onlyOwner { ContractCID = string(abi.encodePacked("ipfs://", CID)); }
/// @notice Used to set the { ContractCID } metadata from ipfs, /// this function is dedicated to contract owner according /// to { onlyOwner } modifier
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 15567, 15710 ] }
2,683
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
contractURI
function contractURI() public view virtual returns (string memory) { return ContractCID; }
/// @notice Used to render { ContractCID } as { contractURI } according to /// Opensea contract metadata standard
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 15845, 15959 ] }
2,684
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
getMapRegisteryForEpoch
function getMapRegisteryForEpoch(uint256 _epoch) public view returns (bool[210] memory result) { uint i = 1; while (i <= maxGenesisSupply) { result[i] = epochMintingRegistry[_epoch][i]; i++; } }
/// @notice Used to fetch all entry for { epoch } into { epochMintingRegistry }
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 16127, 16389 ] }
2,685
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
exposeHeldIds
function exposeHeldIds(address owner) public view returns(uint[] memory) { uint tokenCount = balanceOf(owner); uint[] memory tokenIds = new uint[](tokenCount); uint i = 0; while (i < tokenCount) { tokenIds[i] = tokenOfOwnerByIndex(owner, i); i++; } return tokenIds; }...
/// @notice Used to fetch all { tokenIds } from { owner }
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 16459, 16824 ] }
2,686
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
tokenURI
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token"); return _compileMetadata(_tokenId); }
/// @notice Used to render metadata as { tokenURI } according to ERC721 standard
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 16992, 17231 ] }
2,687
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
_beforeTokenTransfer
function _beforeTokenTransfer(address from, address to, uint256 _tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, _tokenId); }
/// @dev ERC721 required override
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 17273, 17466 ] }
2,688
USDSat
USDSat.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
USDSat
contract USDSat is USDSatMetadata, ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { string SYMBOL = "USDSat"; string NAME = "Dollars Nakamoto"; string ContractCID; /// @notice Address used to sign NFT on mint address public ADDRESS_SIGN = 0x1Af70e564847bE46e4bA286c0b0066Da8372F902; ...
/// ``.. /// `.` `````.``.-````-`` `.` /// ` ``````.`..///.-..----. --..--`.-....`..-.```` ``` /// ...
NatSpecSingleLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); }
/// @dev ERC721 required override
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 17508, 17689 ] }
2,689
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
approveRewardToken
function approveRewardToken() external onlyGovernor { address liquidator = nexus.getModule(keccak256("Liquidator")); require(liquidator != address(0), "Liquidator address cannot be zero"); MassetHelpers.safeInfiniteApprove(rewardToken, liquidator); emit RewardTokenApproved(rewardToken, liquidator); }
/** * @dev Approves Liquidator to spend reward tokens */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 1036, 1379 ] }
2,690
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
deposit
function deposit( address _bAsset, uint256 _amount, bool _hasTxFee ) external override onlyLP nonReentrant returns (uint256 quantityDeposited) { require(_amount > 0, "Must deposit something"); IAaveATokenV2 aToken = _getATokenFor(_bAsset); quantityDeposited = _amount; if (_hasTxFee) { ...
/** * @dev Deposit a quantity of bAsset into the platform. Credited aTokens * remain here in the vault. Can only be called by whitelisted addresses * (mAsset and corresponding BasketManager) * @param _bAsset Address for the bAsset * @param _amount Units of bAsset to deposit * @...
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 1999, 2834 ] }
2,691
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
withdraw
function withdraw( address _receiver, address _bAsset, uint256 _amount, bool _hasTxFee ) external override onlyLP nonReentrant { _withdraw(_receiver, _bAsset, _amount, _amount, _hasTxFee); }
/** * @dev Withdraw a quantity of bAsset from the platform * @param _receiver Address to which the bAsset should be sent * @param _bAsset Address of the bAsset * @param _amount Units of bAsset to withdraw * @param _hasTxFee Is the bAsset known to have a tx fee? */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 3155, 3397 ] }
2,692
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
withdraw
function withdraw( address _receiver, address _bAsset, uint256 _amount, uint256 _totalAmount, bool _hasTxFee ) external override onlyLP nonReentrant { _withdraw(_receiver, _bAsset, _amount, _totalAmount, _hasTxFee); }
/** * @dev Withdraw a quantity of bAsset from the platform * @param _receiver Address to which the bAsset should be sent * @param _bAsset Address of the bAsset * @param _amount Units of bAsset to send to recipient * @param _totalAmount Total units to pull from lending platform * @param _hasTxFee ...
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 3797, 4074 ] }
2,693
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
_withdraw
function _withdraw( address _receiver, address _bAsset, uint256 _amount, uint256 _totalAmount, bool _hasTxFee ) internal { require(_totalAmount > 0, "Must withdraw something"); IAaveATokenV2 aToken = _getATokenFor(_bAsset); if (_hasTxFee) { require(_amount == _totalAmount, "Cac...
/** @dev Withdraws _totalAmount from the lending pool, sending _amount to user */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 4162, 4937 ] }
2,694
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
withdrawRaw
function withdrawRaw( address _receiver, address _bAsset, uint256 _amount ) external override onlyLP nonReentrant { require(_amount > 0, "Must withdraw something"); require(_receiver != address(0), "Must specify recipient"); IERC20(_bAsset).safeTransfer(_receiver, _amount); emit Withdrawal...
/** * @dev Withdraw a quantity of bAsset from the cache. * @param _receiver Address to which the bAsset should be sent * @param _bAsset Address of the bAsset * @param _amount Units of bAsset to withdraw */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 5190, 5583 ] }
2,695
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
checkBalance
function checkBalance(address _bAsset) external view override returns (uint256 balance) { // balance is always with token aToken decimals IAaveATokenV2 aToken = _getATokenFor(_bAsset); return _checkBalance(aToken); }
/** * @dev Get the total bAsset value held in the platform * This includes any interest that was generated since depositing * Aave gradually increases the balances of all aToken holders, as the interest grows * @param _bAsset Address of the bAsset * @return balance Total value of the bAsset in the...
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 5947, 6195 ] }
2,696
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
_abstractSetPToken
function _abstractSetPToken( address _bAsset, address /*_pToken*/ ) internal override { address lendingPool = address(_getLendingPool()); // approve the pool to spend the bAsset MassetHelpers.safeInfiniteApprove(_bAsset, lendingPool); }
/** * @dev Internal method to respond to the addition of new bAsset / pTokens * We need to approve the Aave lending pool core conrtact and give it permission * to spend the bAsset * @param _bAsset Address of the bAsset to approve */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 6591, 6879 ] }
2,697
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
_getLendingPool
function _getLendingPool() internal view returns (IAaveLendingPoolV2) { address lendingPool = ILendingPoolAddressesProviderV2(platformAddress).getLendingPool(); require(lendingPool != address(0), "Lending pool does not exist"); return IAaveLendingPoolV2(lendingPool); }
/** * @dev Get the current address of the Aave lending pool, which is the gateway to * depositing. * @return Current lending pool implementation */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 7178, 7479 ] }
2,698
PAaveIntegration
contracts/masset/peripheral/AaveV2Integration.sol
0x4094aec22f40f11c29941d144c3dc887b33f5504
Solidity
AaveV2Integration
contract AaveV2Integration is AbstractIntegration { using SafeERC20 for IERC20; // Core address for the given platform */ address public immutable platformAddress; address public immutable rewardToken; event RewardTokenApproved(address rewardToken, address account); /** * @param _nexus ...
/** * @title AaveV2Integration * @author mStable * @notice A simple connection to deposit and withdraw bAssets from Aave * @dev VERSION: 1.0 * DATE: 2020-16-11 */
NatSpecMultiLine
_getATokenFor
function _getATokenFor(address _bAsset) internal view returns (IAaveATokenV2) { address aToken = bAssetToPToken[_bAsset]; require(aToken != address(0), "aToken does not exist"); return IAaveATokenV2(aToken); }
/** * @dev Get the pToken wrapped in the IAaveAToken interface for this bAsset, to use * for withdrawing or balance checking. Fails if the pToken doesn't exist in our mappings. * @param _bAsset Address of the bAsset * @return aToken Corresponding to this bAsset */
NatSpecMultiLine
v0.8.6+commit.11564f7e
{ "func_code_index": [ 7782, 8023 ] }
2,699