RadarToken
Deploy on AlchemyContract Information
The following smart contract is a custom ERC20 token called RadarToken. It inherits from the OpenZeppelin ERC20 contract and allows for the creation of a token with a specified name and symbol. The constructor also allows for the initial minting of tokens to specified addresses. The contract includes a burn function to allow users to burn their tokens.
More Info
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @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 guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
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 {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @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 the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
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 allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
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` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
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, currentAllowance - subtractedValue);
}
return true;
}
/**
* @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.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
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);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, 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.
*/
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);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @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.
*/
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 balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @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 address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev 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`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
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`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
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 Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @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.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @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
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, 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.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
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 the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract RadarToken is ERC20 {
/**
* @dev constructor
* @param _erc20Name token name
* @param _erc20Symbol token symbol
* @param _mintAddresses array of address to hold initial tokens
* @param _mintAmounts array of initial token amounts to be minted to mint addresses
*/
constructor(
string memory _erc20Name,
string memory _erc20Symbol,
address[] memory _mintAddresses,
uint256[] memory _mintAmounts
) ERC20(_erc20Name, _erc20Symbol) {
require(_mintAddresses.length == _mintAmounts.length, "RadarToken: must have same number of mint addresses and amounts");
for (uint i; i < _mintAddresses.length; i++) {
require(_mintAddresses[i] != address(0), "RadarToken: cannot have a non-address as reserve.");
ERC20._mint(_mintAddresses[i], _mintAmounts[i]);
}
}
/**
* @dev anyone can burn tokens in their own address
* @param _amount token amount to burn
*/
function burn(uint256 _amount) external {
_burn(msg.sender, _amount);
}
}
[{"inputs":[{"internalType":"string","name":"_erc20Name","type":"string"},{"internalType":"string","name":"_erc20Symbol","type":"string"},{"internalType":"address[]","name":"_mintAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_mintAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
[{"inputs":[{"internalType":"string","name":"_erc20Name","type":"string"},{"internalType":"string","name":"_erc20Symbol","type":"string"},{"internalType":"address[]","name":"_mintAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_mintAmounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
60806040523480156200001157600080fd5b506040516200122a3803806200122a8339810160408190526200003491620004b1565b8351849084906200004d90600390602085019062000303565b5080516200006390600490602084019062000303565b5050508051825114620000e35760405162461bcd60e51b815260206004820152603f60248201527f5261646172546f6b656e3a206d75737420686176652073616d65206e756d626560448201527f72206f66206d696e742061646472657373657320616e6420616d6f756e74730060648201526084015b60405180910390fd5b60005b8251811015620002135760006001600160a01b03168382815181106200011c57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415620001975760405162461bcd60e51b815260206004820152603160248201527f5261646172546f6b656e3a2063616e6e6f7420686176652061206e6f6e2d6164604482015270323932b9b99030b9903932b9b2b93b329760791b6064820152608401620000da565b620001fe838281518110620001bc57634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110620001e557634e487b7160e01b600052603260045260246000fd5b60200260200101516200021e60201b6200043b1760201c565b806200020a8162000688565b915050620000e6565b5050505050620006d2565b6001600160a01b038216620002765760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000da565b80600260008282546200028a919062000630565b90915550506001600160a01b03821660009081526020819052604081208054839290620002b990849062000630565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b82805462000311906200064b565b90600052602060002090601f01602090048101928262000335576000855562000380565b82601f106200035057805160ff191683800117855562000380565b8280016001018555821562000380579182015b828111156200038057825182559160200191906001019062000363565b506200038e92915062000392565b5090565b5b808211156200038e576000815560010162000393565b600082601f830112620003ba578081fd5b81516020620003d3620003cd836200060a565b620005d7565b80838252828201915082860187848660051b8901011115620003f3578586fd5b855b858110156200041357815184529284019290840190600101620003f5565b5090979650505050505050565b600082601f83011262000431578081fd5b81516001600160401b038111156200044d576200044d620006bc565b602062000463601f8301601f19168201620005d7565b828152858284870101111562000477578384fd5b835b838110156200049657858101830151828201840152820162000479565b83811115620004a757848385840101525b5095945050505050565b60008060008060808587031215620004c7578384fd5b84516001600160401b0380821115620004de578586fd5b620004ec8883890162000420565b955060209150818701518181111562000503578586fd5b6200051189828a0162000420565b95505060408701518181111562000526578485fd5b8701601f8101891362000537578485fd5b805162000548620003cd826200060a565b8082825285820191508584018c878560051b870101111562000568578889fd5b8894505b83851015620005a15780516001600160a01b03811681146200058c57898afd5b8352600194909401939186019186016200056c565b5060608b0151909750945050505080821115620005bc578283fd5b50620005cb87828801620003a9565b91505092959194509250565b604051601f8201601f191681016001600160401b0381118282101715620006025762000602620006bc565b604052919050565b60006001600160401b03821115620006265762000626620006bc565b5060051b60200190565b60008219821115620006465762000646620006a6565b500190565b600181811c908216806200066057607f821691505b602082108114156200068257634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200069f576200069f620006a6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b610b4880620006e26000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806342966c681161007157806342966c681461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101e6565b6040516100ce9190610a3f565b60405180910390f35b6100ea6100e53660046109fe565b610278565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a3660046109c3565b61028e565b604051601281526020016100ce565b6100ea61013c3660046109fe565b61033d565b61015461014f366004610a27565b610379565b005b6100fe610164366004610970565b6001600160a01b031660009081526020819052604090205490565b6100c1610386565b6100ea6101953660046109fe565b610395565b6100ea6101a83660046109fe565b61042e565b6100fe6101bb366004610991565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f590610ac1565b80601f016020809104026020016040519081016040528092919081815260200182805461022190610ac1565b801561026e5780601f106102435761010080835404028352916020019161026e565b820191906000526020600020905b81548152906001019060200180831161025157829003601f168201915b5050505050905090565b600061028533848461051a565b50600192915050565b600061029b84848461063f565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103255760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610332853385840361051a565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610285918590610374908690610a92565b61051a565b610383338261080e565b50565b6060600480546101f590610ac1565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156104175760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161031c565b610424338585840361051a565b5060019392505050565b600061028533848461063f565b6001600160a01b0382166104915760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161031c565b80600260008282546104a39190610a92565b90915550506001600160a01b038216600090815260208190526040812080548392906104d0908490610a92565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03831661057c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161031c565b6001600160a01b0382166105dd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161031c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166106a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161031c565b6001600160a01b0382166107055760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161031c565b6001600160a01b0383166000908152602081905260409020548181101561077d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161031c565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906107b4908490610a92565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080091815260200190565b60405180910390a350505050565b6001600160a01b03821661086e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161031c565b6001600160a01b038216600090815260208190526040902054818110156108e25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161031c565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610911908490610aaa565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610632565b80356001600160a01b038116811461096b57600080fd5b919050565b600060208284031215610981578081fd5b61098a82610954565b9392505050565b600080604083850312156109a3578081fd5b6109ac83610954565b91506109ba60208401610954565b90509250929050565b6000806000606084860312156109d7578081fd5b6109e084610954565b92506109ee60208501610954565b9150604084013590509250925092565b60008060408385031215610a10578182fd5b610a1983610954565b946020939093013593505050565b600060208284031215610a38578081fd5b5035919050565b6000602080835283518082850152825b81811015610a6b57858101830151858201604001528201610a4f565b81811115610a7c5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610aa557610aa5610afc565b500190565b600082821015610abc57610abc610afc565b500390565b600181811c90821680610ad557607f821691505b60208210811415610af657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220770066ae2828c1dcf02ea423477e8bf918fbe7543d61628fa5ebd5bc7afc3d9864736f6c63430008040033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000094461707052616461720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000552414441520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c57ac421d34d67252c71bc0bd18ea63a694b89f4000000000000000000000000fb22984f28534d81469e5bb73a1d9e5d5655b6b900000000000000000000000011174a520e017ad3278f3ec2e89251d07a40d911000000000000000000000000e7dd363c482272b9395a183f7d48fa1de98778df00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000000000000000000000828a18c46bb43ccfd00000000000000000000000000000000000000000000000cecb8f27f4200f3a0000000000000000000000000000000000000000000000007ff45a2d8573d638b000000
60806040523480156200001157600080fd5b506040516200122a3803806200122a8339810160408190526200003491620004b1565b8351849084906200004d90600390602085019062000303565b5080516200006390600490602084019062000303565b5050508051825114620000e35760405162461bcd60e51b815260206004820152603f60248201527f5261646172546f6b656e3a206d75737420686176652073616d65206e756d626560448201527f72206f66206d696e742061646472657373657320616e6420616d6f756e74730060648201526084015b60405180910390fd5b60005b8251811015620002135760006001600160a01b03168382815181106200011c57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03161415620001975760405162461bcd60e51b815260206004820152603160248201527f5261646172546f6b656e3a2063616e6e6f7420686176652061206e6f6e2d6164604482015270323932b9b99030b9903932b9b2b93b329760791b6064820152608401620000da565b620001fe838281518110620001bc57634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110620001e557634e487b7160e01b600052603260045260246000fd5b60200260200101516200021e60201b6200043b1760201c565b806200020a8162000688565b915050620000e6565b5050505050620006d2565b6001600160a01b038216620002765760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401620000da565b80600260008282546200028a919062000630565b90915550506001600160a01b03821660009081526020819052604081208054839290620002b990849062000630565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b82805462000311906200064b565b90600052602060002090601f01602090048101928262000335576000855562000380565b82601f106200035057805160ff191683800117855562000380565b8280016001018555821562000380579182015b828111156200038057825182559160200191906001019062000363565b506200038e92915062000392565b5090565b5b808211156200038e576000815560010162000393565b600082601f830112620003ba578081fd5b81516020620003d3620003cd836200060a565b620005d7565b80838252828201915082860187848660051b8901011115620003f3578586fd5b855b858110156200041357815184529284019290840190600101620003f5565b5090979650505050505050565b600082601f83011262000431578081fd5b81516001600160401b038111156200044d576200044d620006bc565b602062000463601f8301601f19168201620005d7565b828152858284870101111562000477578384fd5b835b838110156200049657858101830151828201840152820162000479565b83811115620004a757848385840101525b5095945050505050565b60008060008060808587031215620004c7578384fd5b84516001600160401b0380821115620004de578586fd5b620004ec8883890162000420565b955060209150818701518181111562000503578586fd5b6200051189828a0162000420565b95505060408701518181111562000526578485fd5b8701601f8101891362000537578485fd5b805162000548620003cd826200060a565b8082825285820191508584018c878560051b870101111562000568578889fd5b8894505b83851015620005a15780516001600160a01b03811681146200058c57898afd5b8352600194909401939186019186016200056c565b5060608b0151909750945050505080821115620005bc578283fd5b50620005cb87828801620003a9565b91505092959194509250565b604051601f8201601f191681016001600160401b0381118282101715620006025762000602620006bc565b604052919050565b60006001600160401b03821115620006265762000626620006bc565b5060051b60200190565b60008219821115620006465762000646620006a6565b500190565b600181811c908216806200066057607f821691505b602082108114156200068257634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200069f576200069f620006a6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b610b4880620006e26000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806342966c681161007157806342966c681461014157806370a082311461015657806395d89b411461017f578063a457c2d714610187578063a9059cbb1461019a578063dd62ed3e146101ad57600080fd5b806306fdde03146100b9578063095ea7b3146100d757806318160ddd146100fa57806323b872dd1461010c578063313ce5671461011f578063395093511461012e575b600080fd5b6100c16101e6565b6040516100ce9190610a3f565b60405180910390f35b6100ea6100e53660046109fe565b610278565b60405190151581526020016100ce565b6002545b6040519081526020016100ce565b6100ea61011a3660046109c3565b61028e565b604051601281526020016100ce565b6100ea61013c3660046109fe565b61033d565b61015461014f366004610a27565b610379565b005b6100fe610164366004610970565b6001600160a01b031660009081526020819052604090205490565b6100c1610386565b6100ea6101953660046109fe565b610395565b6100ea6101a83660046109fe565b61042e565b6100fe6101bb366004610991565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f590610ac1565b80601f016020809104026020016040519081016040528092919081815260200182805461022190610ac1565b801561026e5780601f106102435761010080835404028352916020019161026e565b820191906000526020600020905b81548152906001019060200180831161025157829003601f168201915b5050505050905090565b600061028533848461051a565b50600192915050565b600061029b84848461063f565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103255760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b610332853385840361051a565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610285918590610374908690610a92565b61051a565b610383338261080e565b50565b6060600480546101f590610ac1565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156104175760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161031c565b610424338585840361051a565b5060019392505050565b600061028533848461063f565b6001600160a01b0382166104915760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161031c565b80600260008282546104a39190610a92565b90915550506001600160a01b038216600090815260208190526040812080548392906104d0908490610a92565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03831661057c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161031c565b6001600160a01b0382166105dd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161031c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166106a35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161031c565b6001600160a01b0382166107055760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161031c565b6001600160a01b0383166000908152602081905260409020548181101561077d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161031c565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906107b4908490610a92565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161080091815260200190565b60405180910390a350505050565b6001600160a01b03821661086e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161031c565b6001600160a01b038216600090815260208190526040902054818110156108e25760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161031c565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610911908490610aaa565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610632565b80356001600160a01b038116811461096b57600080fd5b919050565b600060208284031215610981578081fd5b61098a82610954565b9392505050565b600080604083850312156109a3578081fd5b6109ac83610954565b91506109ba60208401610954565b90509250929050565b6000806000606084860312156109d7578081fd5b6109e084610954565b92506109ee60208501610954565b9150604084013590509250925092565b60008060408385031215610a10578182fd5b610a1983610954565b946020939093013593505050565b600060208284031215610a38578081fd5b5035919050565b6000602080835283518082850152825b81811015610a6b57858101830151858201604001528201610a4f565b81811115610a7c5783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610aa557610aa5610afc565b500190565b600082821015610abc57610abc610afc565b500390565b600181811c90821680610ad557607f821691505b60208210811415610af657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220770066ae2828c1dcf02ea423477e8bf918fbe7543d61628fa5ebd5bc7afc3d9864736f6c63430008040033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000094461707052616461720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000552414441520000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000c57ac421d34d67252c71bc0bd18ea63a694b89f4000000000000000000000000fb22984f28534d81469e5bb73a1d9e5d5655b6b900000000000000000000000011174a520e017ad3278f3ec2e89251d07a40d911000000000000000000000000e7dd363c482272b9395a183f7d48fa1de98778df00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000033b2e3c9fd0803ce800000000000000000000000000000000000000000000000828a18c46bb43ccfd00000000000000000000000000000000000000000000000cecb8f27f4200f3a0000000000000000000000000000000000000000000000007ff45a2d8573d638b000000