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
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
adjustPosition
function adjustPosition(uint256 _debtOutstanding) internal override { _debtOutstanding; //ignored. we handle it in prepare return //emergency exit is dealt with at beginning of harvest if (emergencyExit) { return; } //we just keep all money in want if we dont have any lenders if...
/* * Key logic. * The algorithm moves assets from lowest return to highest * like a very slow idiots bubble sort * we ignore debt outstanding for an easy life */
Comment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 13427, 14326 ] }
2,400
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
manualAllocation
function manualAllocation(lenderRatio[] memory _newPositions) public onlyAuthorized { uint256 share = 0; for (uint256 i = 0; i < lenders.length; i++) { lenders[i].withdrawAll(); } uint256 assets = want.balanceOf(address(this)); for (uint256 i = 0; i < _newPositions.length; i++) {...
//share must add up to 1000. 500 means 50% etc
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 14488, 15540 ] }
2,401
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
_withdrawSome
function _withdrawSome(uint256 _amount) internal returns (uint256 amountWithdrawn) { if (lenders.length == 0) { return 0; } //dont withdraw dust if (_amount < withdrawalThreshold) { return 0; } amountWithdrawn = 0; //most situations this will only run once. Only ...
//cycle through withdrawing from worst rate first
LineComment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 15598, 16852 ] }
2,402
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
liquidatePosition
function liquidatePosition(uint256 _amountNeeded) internal override returns (uint256 _amountFreed, uint256 _loss) { uint256 _balance = want.balanceOf(address(this)); if (_balance >= _amountNeeded) { //if we don't set reserve here withdrawer will be sent our full balance return (_amountNeed...
/* * Liquidate as many assets as possible to `want`, irregardless of slippage, * up to `_amountNeeded`. Any excess should be re-invested here as well. */
Comment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 17032, 17669 ] }
2,403
Strategy
Strategy.sol
0x3280499298ace3fd3cd9c2558e9e8746ace3e52d
Solidity
Strategy
contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address public constant uniswapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; uint256 pu...
/******************** * * A lender optimisation strategy for any erc20 asset * https://github.com/Grandthrax/yearnV2-generic-lender-strat * v0.3.1 * * This strategy works by taking plugins designed for standard lending platforms * It automatically chooses the best yield generating platform and a...
NatSpecMultiLine
prepareMigration
function prepareMigration(address _newStrategy) internal override { uint256 outstanding = vault.strategies(address(this)).totalDebt; (, uint256 loss, uint256 wantBalance) = prepareReturn(outstanding); }
/* * revert if we can't withdraw full balance */
Comment
v0.6.12+commit.27d51765
Unknown
ipfs://7a224399c14c11ec8e7f566fabefc939a638034f3ad5dd97286939b9860a8e5f
{ "func_code_index": [ 20111, 20341 ] }
2,404
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); T...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 268, 659 ] }
2,405
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) pub...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 865, 981 ] }
2,406
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 401, 853 ] }
2,407
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 1485, 1675 ] }
2,408
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 1999, 2144 ] }
2,409
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transf...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 2389, 2662 ] }
2,410
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
Ownable
function Ownable() public { owner = msg.sender; }
/** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 261, 321 ] }
2,411
Deployer
Deployer.sol
0x00bef2b6b0948de9e97e2038a1dd87af0b1bcf14
Solidity
Ownable
contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; }...
/** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; }
/** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */
NatSpecMultiLine
v0.4.18+commit.9cf6e910
bzzr://14c5cdf03abf9c42b7d5eb5b37f1850002b400f2226485b5d7ff59a314635f9c
{ "func_code_index": [ 644, 820 ] }
2,412
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
owner
function owner() public view virtual returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 408, 500 ] }
2,413
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
renounceOwnership
function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1059, 1167 ] }
2,414
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
transferOwnership
function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1317, 1523 ] }
2,415
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
Ownable
abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender...
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. ...
NatSpecMultiLine
_transferOwnership
function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1678, 1874 ] }
2,416
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 94, 154 ] }
2,417
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 237, 310 ] }
2,418
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 534, 616 ] }
2,419
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 895, 983 ] }
2,420
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1647, 1726 ] }
2,421
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
/** * @dev Interface of the ERC20 standard as defined in the EIP. */
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 2039, 2175 ] }
2,422
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
name
function name() external view returns (string memory);
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 100, 159 ] }
2,423
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
symbol
function symbol() external view returns (string memory);
/** * @dev Returns the symbol of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 226, 287 ] }
2,424
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
IERC20Metadata
interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns t...
/** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */
NatSpecMultiLine
decimals
function decimals() external view returns (uint8);
/** * @dev Returns the decimals places of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 363, 418 ] }
2,425
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view virtual override returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 776, 881 ] }
2,426
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view virtual override returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 995, 1104 ] }
2,427
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view virtual override returns (uint8) { return 18; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1738, 1836 ] }
2,428
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public view virtual override returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1896, 2009 ] }
2,429
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 2067, 2199 ] }
2,430
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transfer
function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 2407, 2587 ] }
2,431
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
allowance
function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 2645, 2801 ] }
2,432
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
approve
function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 2943, 3117 ] }
2,433
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds all...
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 3594, 4091 ] }
2,434
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 4495, 4715 ] }
2,435
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, c...
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 5213, 5631 ] }
2,436
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_transfer
function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); ...
/** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 6116, 6854 ] }
2,437
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_mint
function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _...
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 7136, 7540 ] }
2,438
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_burn
function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds ba...
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 7868, 8464 ] }
2,439
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_approve
function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(own...
/** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero a...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 8897, 9282 ] }
2,440
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_beforeTokenTransfer
function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - wh...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 9877, 10007 ] }
2,441
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
ERC20
contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
_afterTokenTransfer
function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {}
/** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - ...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 10606, 10735 ] }
2,442
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 161, 388 ] }
2,443
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 536, 735 ] }
2,444
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 885, 1393 ] }
2,445
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1544, 1744 ] }
2,446
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 1905, 2105 ] }
2,447
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 2347, 2450 ] }
2,448
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 2728, 2831 ] }
2,449
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 3085, 3188 ] }
2,450
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 3484, 3587 ] }
2,451
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 4049, 4152 ] }
2,452
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 4626, 4871 ] }
2,453
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an ...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 5364, 5608 ] }
2,454
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 6266, 6510 ] }
2,455
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
MARSTYSONINU
contract MARSTYSONINU is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; addres...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
enableTrading
function enableTrading() external onlyOwner { tradingActive = true; swapEnabled = true; lastLpBurnTime = block.timestamp; sellMarketingFee = 9; sellLiquidityFee = 1; sellDevFee = 5; sellTotalFees = sellMarketingFee + sellLiquidityFee + sellDevFee; }
// once enabled, can never be turned off
LineComment
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 4917, 5239 ] }
2,456
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
MARSTYSONINU
contract MARSTYSONINU is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; addres...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
removeLimits
function removeLimits() external onlyOwner returns (bool) { limitsInEffect = false; return true; }
// remove limits after token is stable
LineComment
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 5286, 5412 ] }
2,457
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
MARSTYSONINU
contract MARSTYSONINU is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; addres...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
disableTransferDelay
function disableTransferDelay() external onlyOwner returns (bool) { transferDelayEnabled = false; return true; }
// disable Transfer delay - cannot be reenabled
LineComment
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 5468, 5608 ] }
2,458
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
MARSTYSONINU
contract MARSTYSONINU is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; addres...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
updateSwapTokensAtAmount
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { require( newAmount >= (totalSupply() * 1) / 100000, "Swap amount cannot be lower than 0.001% total supply." ); require( newAmount <= (totalSupply() * 5) / 1000, "Sw...
// change the minimum amount of tokens to sell from fees
LineComment
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 5673, 6175 ] }
2,459
MARSTYSONINU
MARSTYSONINU.sol
0x384aeab9637b4c80b3e764b51341fdb184b548d0
Solidity
MARSTYSONINU
contract MARSTYSONINU is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; addres...
/* import {SafeMath} from "lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol"; */
Comment
updateSwapEnabled
function updateSwapEnabled(bool enabled) external onlyOwner { swapEnabled = enabled; }
// only use to disable contract sales if absolutely necessary (emergency use only)
LineComment
v0.8.10+commit.fc410830
Unlicense
ipfs://f996311b2255c6c34f8f8427ee8cd0ce7e8d10fa76f1b865d2ee74d81753475a
{ "func_code_index": [ 6988, 7093 ] }
2,460
Staking
contracts/interfaces/IErc20Min.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IErc20Min
interface IErc20Min { /// @dev ERC-20 `balanceOf` function balanceOf(address account) external view returns (uint256); /// @dev ERC-20 `transfer` function transfer(address recipient, uint256 amount) external returns (bool); /// @dev ERC-20 `transferFrom` function transferFrom( ...
balanceOf
function balanceOf(address account) external view returns (uint256);
/// @dev ERC-20 `balanceOf`
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 54, 126 ] }
2,461
Staking
contracts/interfaces/IErc20Min.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IErc20Min
interface IErc20Min { /// @dev ERC-20 `balanceOf` function balanceOf(address account) external view returns (uint256); /// @dev ERC-20 `transfer` function transfer(address recipient, uint256 amount) external returns (bool); /// @dev ERC-20 `transferFrom` function transferFrom( ...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/// @dev ERC-20 `transfer`
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 159, 256 ] }
2,462
Staking
contracts/interfaces/IErc20Min.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IErc20Min
interface IErc20Min { /// @dev ERC-20 `balanceOf` function balanceOf(address account) external view returns (uint256); /// @dev ERC-20 `transfer` function transfer(address recipient, uint256 amount) external returns (bool); /// @dev ERC-20 `transferFrom` function transferFrom( ...
transferFrom
function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool);
/// @dev ERC-20 `transferFrom`
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 293, 424 ] }
2,463
Staking
contracts/interfaces/IErc20Min.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IErc20Min
interface IErc20Min { /// @dev ERC-20 `balanceOf` function balanceOf(address account) external view returns (uint256); /// @dev ERC-20 `transfer` function transfer(address recipient, uint256 amount) external returns (bool); /// @dev ERC-20 `transferFrom` function transferFrom( ...
permit
function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external;
/// @dev EIP-2612 `permit`
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 457, 644 ] }
2,464
ZoomiesToken
ZoomiesToken.sol
0x12c79b44a21a9898d8f787e88a332e8a43b382a3
Solidity
Context
contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns(address payable) { return msg.sender; } }
_msgSender
function _msgSender() internal view returns(address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.5.17+commit.d19bba13
None
bzzr://661d5ff8a20c81404ed68dd942ed2150452bd5e53f6a51780ba07c5a3b70abfd
{ "func_code_index": [ 105, 207 ] }
2,465
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
totalVotingPower
function totalVotingPower() external view returns (uint256);
/// @notice Returns total voting power staked /// @dev "own" and "delegated" voting power summed up
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 447, 511 ] }
2,466
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
totalPower
function totalPower() external view returns (Power memory);
/// @notice Returns total "own" and total "delegated" voting power separately /// @dev Useful, if "own" and "delegated" voting power treated differently
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 674, 737 ] }
2,467
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
globalSnapshotAt
function globalSnapshotAt(uint256 blockNum, uint256 hint) external view returns (Snapshot memory);
/// @notice Returns global snapshot for given block /// @param blockNum - block number to get state at /// @param hint - off-chain computed index of the required snapshot
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 922, 1048 ] }
2,468
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
snapshotAt
function snapshotAt( address _account, uint256 blockNum, uint256 hint ) external view returns (Snapshot memory);
/// @notice Returns snapshot on given block for given account /// @param _account - account to get snapshot for /// @param blockNum - block number to get state at /// @param hint - off-chain computed index of the required snapshot
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1297, 1441 ] }
2,469
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
latestGlobalsSnapshotBlock
function latestGlobalsSnapshotBlock() external view returns (uint256);
/// @dev Returns block number of the latest global snapshot
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1507, 1581 ] }
2,470
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
latestSnapshotBlock
function latestSnapshotBlock(address _account) external view returns (uint256);
/// @dev Returns block number of the given account latest snapshot
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1654, 1761 ] }
2,471
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
globalsSnapshotLength
function globalsSnapshotLength() external view returns (uint256);
/// @dev Returns number of global snapshots
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1811, 1880 ] }
2,472
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
snapshotLength
function snapshotLength(address _account) external view returns (uint256);
/// @dev Returns number of snapshots for given account
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1941, 2019 ] }
2,473
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
globalsSnapshot
function globalsSnapshot(uint256 _index) external view returns (Snapshot memory);
/// @dev Returns global snapshot at given index
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2073, 2182 ] }
2,474
Staking
contracts/interfaces/IVotingPower.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
IVotingPower
interface IVotingPower { struct Snapshot { uint32 beforeBlock; uint96 ownPower; uint96 delegatedPower; } /// @dev Voting power integrants struct Power { uint96 own; // voting power that remains after delegating to others uint96 delegated; // voting power delegate...
/// @title IStaking
NatSpecSingleLine
snapshot
function snapshot(address _account, uint256 _index) external view returns (Snapshot memory);
/// @dev Returns snapshot at given index for given account
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 2247, 2367 ] }
2,475
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
Context
contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (addres...
_msgSender
function _msgSender() internal view returns (address payable) { return msg.sender; }
// solhint-disable-previous-line no-empty-blocks
LineComment
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 265, 368 ] }
2,476
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; ...
/** * @dev Multiplies two numbers, throws on overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 100, 527 ] }
2,477
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; }
/** * @dev Integer division of two numbers, truncating the quotient. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 618, 918 ] }
2,478
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; }
/** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 1039, 1167 ] }
2,479
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
SafeMath
library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. ...
add
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; }
/** * @dev Adds two numbers, throws on overflow. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 1238, 1384 ] }
2,480
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
totalSupply
function totalSupply() public view returns (uint256) { return totalSupply_; }
/** * @dev Total number of tokens in existence */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 228, 324 ] }
2,481
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
_transfer
function _transfer(address _sender, address _to, uint256 _value) internal returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[_sender] = balances[_sender].sub(_value); balances[_to] = balance...
/** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 495, 940 ] }
2,482
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
BasicToken
contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; ...
/** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
/** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 1159, 1271 ] }
2,483
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) blackList; function transfer(address _to, uint256 _value) public returns (bool) { require(blackList[msg.sender] <= 0); return _transfer(msg.sender, _to, _v...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 625, 1120 ] }
2,484
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) blackList; function transfer(address _to, uint256 _value) public returns (bool) { require(blackList[msg.sender] <= 0); return _transfer(msg.sender, _to, _v...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; }
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 1771, 1982 ] }
2,485
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) blackList; function transfer(address _to, uint256 _value) public returns (bool) { require(blackList[msg.sender] <= 0); return _transfer(msg.sender, _to, _v...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 2317, 2456 ] }
2,486
BitcoinFile
BitcoinFile.sol
0x9572c3bd6796011f4740b17bcdb90ce5cd8ce655
Solidity
StandardToken
contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) blackList; function transfer(address _to, uint256 _value) public returns (bool) { require(blackList[msg.sender] <= 0); return _transfer(msg.sender, _to, _v...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
increaseApproval
function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; }
/** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */
NatSpecMultiLine
v0.5.17+commit.d19bba13
None
bzzr://c11658816b02fcb0765ab6378517ff109e08d695b3a6ec7d933acbb538032a0a
{ "func_code_index": [ 2712, 2997 ] }
2,487
Staking
contracts/utils/Utils.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
Utils
abstract contract Utils { function safe32(uint256 n) internal pure returns (uint32) { require(n < 2**32, "UNSAFE32"); return uint32(n); } function safe96(uint256 n) internal pure returns (uint96) { require(n < 2**96, "UNSAFE96"); return uint96(n); } function safe128...
timeNow
function timeNow() internal view virtual returns (uint256) { return block.timestamp; }
/// @dev Returns the current block timestamp (added to ease testing)
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 865, 967 ] }
2,488
Staking
contracts/utils/Utils.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
Utils
abstract contract Utils { function safe32(uint256 n) internal pure returns (uint32) { require(n < 2**32, "UNSAFE32"); return uint32(n); } function safe96(uint256 n) internal pure returns (uint96) { require(n < 2**96, "UNSAFE96"); return uint96(n); } function safe128...
blockNow
function blockNow() internal view virtual returns (uint256) { return block.number; }
/// @dev Returns the current block number (added to ease testing)
NatSpecSingleLine
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1039, 1139 ] }
2,489
USDSat
Base64.sol
0xbeda58401038c864c9fc9145f28e47b7b00a0e86
Solidity
Base64
library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0...
/// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <brecht@loopring.org>
NatSpecSingleLine
encode
function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); byte...
/// @notice Encodes some bytes to the base64 representation
NatSpecSingleLine
v0.8.10+commit.fc410830
MIT
ipfs://627efb7c58e0f1a820013031c32ab417b2b86eb0e16948f99bf7e29ad6e50407
{ "func_code_index": [ 186, 1747 ] }
2,490
Staking
contracts/actions/StakingMsgProcessor.sol
0xf4d06d72dacdd8393fa4ea72fdcc10049711f899
Solidity
StakingMsgProcessor
abstract contract StakingMsgProcessor { bytes4 internal constant STAKE_ACTION = bytes4(keccak256("stake")); bytes4 internal constant UNSTAKE_ACTION = bytes4(keccak256("unstake")); function _encodeStakeActionType(bytes4 stakeType) internal pure returns (bytes4) { return b...
_unpackStakingActionMsg
function _unpackStakingActionMsg(bytes memory message) internal pure returns ( address staker, uint96 amount, uint32 id, uint32 stakedAt, uint32 lockedTill, uint32 claimedAt, bytes memory data ) { // staker, amount, id and 3 timestamps occupy e...
// For efficiency we use "packed" (rather than "ABI") encoding. // It results in shorter data, but requires custom unpack function.
LineComment
v0.8.4+commit.c7e474f2
{ "func_code_index": [ 1243, 2740 ] }
2,491
AirDrop
AirDrop.sol
0x281fb767f700c1035204295d37aa83d7864253ac
Solidity
AirDrop
contract AirDrop is Ownable { Token token; event TransferredToken(address indexed to, uint256 value); event FailedTransfer(address indexed to, uint256 value); modifier whenDropIsActive() { assert(isActive()); _; } function AirDrop () { address _tokenAddr = 0xCEb99b21d2C9CB01...
sendTokens
function sendTokens(address[] dests, uint256[] values) whenDropIsActive onlyOwner external { uint256 i = 0; while (i < dests.length) { uint256 toSend = values[i] * 10**8; sendInternally(dests[i] , toSend, values[i]); i++; } }
//below function can be used when you want to send every recipeint with different number of tokens
LineComment
v0.4.21+commit.dfe3193c
bzzr://eea4db2e06f81693931d07258466333b0460f37d52c9cfe65fff6af5af773b15
{ "func_code_index": [ 633, 906 ] }
2,492
AirDrop
AirDrop.sol
0x281fb767f700c1035204295d37aa83d7864253ac
Solidity
AirDrop
contract AirDrop is Ownable { Token token; event TransferredToken(address indexed to, uint256 value); event FailedTransfer(address indexed to, uint256 value); modifier whenDropIsActive() { assert(isActive()); _; } function AirDrop () { address _tokenAddr = 0xCEb99b21d2C9CB01...
sendTokensSingleValue
function sendTokensSingleValue(address[] dests, uint256 value) whenDropIsActive onlyOwner external { uint256 i = 0; uint256 toSend = value * 10**8; while (i < dests.length) { sendInternally(dests[i] , toSend, value); i++; } }
// this function can be used when you want to send same number of tokens to all the recipients
LineComment
v0.4.21+commit.dfe3193c
bzzr://eea4db2e06f81693931d07258466333b0460f37d52c9cfe65fff6af5af773b15
{ "func_code_index": [ 1007, 1278 ] }
2,493
UniswapRepayAdapter
contracts/interfaces/IPriceOracleGetter.sol
0x3261e8da2fe3799d2068d9164839d4c9a0b49ad8
Solidity
IPriceOracleGetter
interface IPriceOracleGetter { /** * @dev returns the asset price in ETH * @param asset the address of the asset * @return the ETH price of the asset **/ function getAssetPrice(address asset) external view returns (uint256); }
/** * @title IPriceOracleGetter interface * @notice Interface for the Aave price oracle. **/
NatSpecMultiLine
getAssetPrice
function getAssetPrice(address asset) external view returns (uint256);
/** * @dev returns the asset price in ETH * @param asset the address of the asset * @return the ETH price of the asset **/
NatSpecMultiLine
v0.6.12+commit.27d51765
{ "func_code_index": [ 168, 240 ] }
2,494
LockToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xb7bb4b08995b96bb5e577c5b02a237a6c625c172
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://306999eeb4c1d068aa04064db551e6e3b3ceff5ee40a729cee3075c5ff012b1d
{ "func_code_index": [ 898, 986 ] }
2,495
LockToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xb7bb4b08995b96bb5e577c5b02a237a6c625c172
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://306999eeb4c1d068aa04064db551e6e3b3ceff5ee40a729cee3075c5ff012b1d
{ "func_code_index": [ 1100, 1192 ] }
2,496
LockToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xb7bb4b08995b96bb5e577c5b02a237a6c625c172
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is...
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://306999eeb4c1d068aa04064db551e6e3b3ceff5ee40a729cee3075c5ff012b1d
{ "func_code_index": [ 1825, 1913 ] }
2,497
LockToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xb7bb4b08995b96bb5e577c5b02a237a6c625c172
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
totalSupply
function totalSupply() public override view returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://306999eeb4c1d068aa04064db551e6e3b3ceff5ee40a729cee3075c5ff012b1d
{ "func_code_index": [ 1973, 2078 ] }
2,498
LockToken
@openzeppelin/contracts/token/ERC20/ERC20.sol
0xb7bb4b08995b96bb5e577c5b02a237a6c625c172
Solidity
ERC20
contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _sy...
/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our...
NatSpecMultiLine
balanceOf
function balanceOf(address account) public override view returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.6.12+commit.27d51765
MIT
ipfs://306999eeb4c1d068aa04064db551e6e3b3ceff5ee40a729cee3075c5ff012b1d
{ "func_code_index": [ 2136, 2260 ] }
2,499