Contract Address Details

0xa6b9579563A48a0540BB53853Ae0947972371169

Token
VNDC (VNDC)
Creator
0x557d...9354 at 0xf745...9c82
Balance
0 ONUS
Tokens
Fetching tokens...
Transactions
8,363 Transactions
Transfers
21 Transfers
Gas Used
341,040,290
Last Balance Update
22446372
Contract name:
TokenVNDC




Optimization enabled
true
Compiler version
v0.8.18+commit.87f61d96




Optimization runs
1000000
Verified at
2024-04-28 07:13:00.153299Z

Constructor Arguments

000000000000000000000000785bc3471e839fb32ec6dc1b8a5c5f568da9cd560000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fb40000000000000000000000000000000000000000000000000000000000006784

Arg [0] (address) : 0x785bc3471e839fb32ec6dc1b8a5c5f568da9cd56
Arg [1] (uint256) : 1
Arg [2] (uint256) : 1
Arg [3] (uint256) : 0
Arg [4] (uint256) : 24500
Arg [5] (uint256) : 26500

              

contracts/VNDC2.0.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface IPancakeRouter {
function quote(
uint amountA,
uint reserveA,
uint reserveB
) external pure returns (uint amountB);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
}
interface IPancakePair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function token0() external view returns (address);
}
contract TokenVNDC is ERC20, ERC20Burnable, Pausable, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Router address
IPancakeRouter public router;
// Pair address
mapping(address => IPancakePair) public lpPairMap;
// List of currency support
mapping(address => bool) public currencyList;
// Min amount to mint
uint256 public minAmountMint;
struct User {
uint256 mintMax;
bool mintable;
bool redeemable;
uint256 lastMintTimestamp;
bool active;
}
// Track user address is currency whitelist
mapping(address => address[]) public users;
// Check user is whitelist in a currency, currency => user addres => user
mapping(address => mapping(address => User)) public whitelistMap;
// Check user is admin
mapping(address => bool) public adminMap;
// Total token per user
mapping(address => mapping(address => uint256)) public totalVNDCPerUserMap; // totalVNDCPerUserMap[user][currency]
mapping(address => mapping(address => uint256)) public totalTokenPerUserMap; // totalTokenPerUserMap[user][currency]
mapping(address => mapping(address => uint256)) public lpPerUser;
// Fee Withdraw
uint256 public feeWithdraw; // 13 = 1.3%
uint256 public bonus; // 10 = 1%
uint256 public constant BASE_RATE = 1000;
// Mint redeem setting
struct MinMaxSetting {
uint256 minPriceMint;
uint256 maxPriceRedeem;
uint256 minSeconds;
}
MinMaxSetting public minMaxSetting;
constructor(address _router, uint256 _minAmountMint, uint256 _feeWithdraw, uint256 _bonus, uint256 _minPriceMint, uint256 _maxPriceRedeem)
ERC20("VNDC", "VNDC") {
router = IPancakeRouter(_router);
minAmountMint = _minAmountMint;
feeWithdraw = _feeWithdraw;
bonus = _bonus;
minMaxSetting = MinMaxSetting({
minPriceMint: _minPriceMint,
maxPriceRedeem: _maxPriceRedeem,
minSeconds: 1209600 // 14*86400
});
// Mint 26 billion VNDC to owner
_mint(msg.sender, 26_000_000_000);
}
// Check admin or owner
modifier isAdmin() {
require(
adminMap[msg.sender] || msg.sender == owner(),
"Caller is not admin"
);
_;
}
// Event add whitelist
event EventAddWhitelist(address[] _whitelist, bool _mintable, bool _redeemable, uint256 _mintMax, address _currency);
// Event mint
event EventMintWhitelist(
address indexed to,
uint256 amount,
address indexed currency,
uint256 amountsOut,
uint256 liquidity
);
// Event withdraw token, burn VNDC whitelist
event EventWithdrawWhitelist(
address indexed to,
uint256 amountLiquidty,
address indexed currency,
uint256 amountAWithdraw,
uint256 amountBWithdraw,
uint256 feeWithdraw
);
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
// Mint VNDC with whitelist
function mintWhitelist(uint256 _amount, address _currency, uint256 slippage) public {
// Check whitelist mintable
require(whitelistMap[_currency][msg.sender].mintable, "Caller is not whitelist");
// Check min amount
require(_amount >= minAmountMint, "Amounts must be greater than min amount");
// Check currency
require(currencyList[_currency], "Currency is not support");
// Check max amount
require(_amount <= (whitelistMap[_currency][msg.sender].mintMax.sub(totalTokenPerUserMap[msg.sender][_currency])), "Amounts must be less than maximum minting");
// get reserve
(uint256 VNDCReserve, uint256 currencyReserve) = getReserve(_currency);
// Get amount out
uint256 amountsOut = router.quote(_amount, currencyReserve, VNDCReserve);
require(getPriceInputToken(_amount, _currency) > minMaxSetting.minPriceMint, "The price must be more than minPriceMint");
// Transfer from currency to this contract
IERC20(_currency).safeTransferFrom(msg.sender, address(this), _amount);
uint256 amountAMin = amountsOut.sub(amountsOut.mul(slippage).div(BASE_RATE));
uint256 amountBMin = _amount.sub(_amount.mul(slippage).div(BASE_RATE));
// mint VNDC to contract
_mint(address(this), amountsOut);
// approve liquidity router
IERC20(_currency).safeIncreaseAllowance(address(router), _amount);
IERC20(address(this)).safeIncreaseAllowance(address(router), amountsOut);
// add liquidity
(, , uint256 liquidity) = router.addLiquidity(
address(this), // VNDC
_currency, // token
amountsOut,
_amount,
amountAMin,
amountBMin,
address(this),
block.timestamp + 3600 // deadline 1 hour
);
// mint VNDC to user
uint256 bonusVNDC = bonus.mul(amountsOut).div(BASE_RATE);
_mint(msg.sender, amountsOut + bonusVNDC);
// update total token per user
totalVNDCPerUserMap[msg.sender][_currency] = totalVNDCPerUserMap[msg.sender][_currency].add(amountsOut);
totalTokenPerUserMap[msg.sender][_currency] = totalTokenPerUserMap[msg.sender][_currency].add(_amount);
lpPerUser[msg.sender][_currency] = lpPerUser[msg.sender][_currency].add(liquidity);
whitelistMap[_currency][msg.sender].lastMintTimestamp = block.timestamp;
// emit event
emit EventMintWhitelist(
msg.sender,
_amount,
_currency,
amountsOut + bonusVNDC,
liquidity
);
}
// Withdraw token, burn VNDC whitelist (amountA is amount VNDC)
function withdrawWhitelist(uint256 _amountVNDC, address _currency, uint256 _slippage) public {
// Check whitelist redeemable
require(whitelistMap[_currency][msg.sender].redeemable, "Caller is not whitelist");
require(_amountVNDC <= totalVNDCPerUserMap[msg.sender][_currency], "Amounts must be less than total VNDC");
require(isAfterMintTime(whitelistMap[_currency][msg.sender].lastMintTimestamp), "You must wait to redeem");
// Check currency
require(currencyList[_currency], "Currency is not support");
require(getPriceInputVNDC(_amountVNDC, _currency) < minMaxSetting.maxPriceRedeem, "The price must be less than maxPriceRedeem");
uint256 amountLiquidity = getAmountLiquidity(_amountVNDC, msg.sender, _currency);
(uint256 VNDCAmount, uint256 currencyAmount) = estimateAmountByLp(_currency, amountLiquidity);
uint256 amountAMin = VNDCAmount.sub(VNDCAmount.mul(_slippage).div(BASE_RATE)); // slippage
uint256 amountBMin = currencyAmount.sub(currencyAmount.mul(_slippage).div(BASE_RATE)); // slippage
// remove liquidity
IERC20(address(lpPairMap[_currency])).safeIncreaseAllowance(address(router), amountLiquidity);
(uint256 amountVNDCWithdraw, uint256 amountCurrencyWithdraw) = router.removeLiquidity(
address(this), // VNDC
_currency, // token
amountLiquidity,
amountAMin, // min amount VNDC
amountBMin, // min amount token
address(this),
block.timestamp + 3600 // deadline 1 hour
);
// Burn VNDC
_burn(address(this), amountVNDCWithdraw);
_burn(msg.sender, _amountVNDC);
uint256 feeWithdrawAmount = amountCurrencyWithdraw.mul(feeWithdraw).div(BASE_RATE);
uint256 actualWithdrawAmount = amountCurrencyWithdraw.sub(feeWithdrawAmount);
// Transfer fee to owner
IERC20(_currency).safeTransfer(owner(), feeWithdrawAmount);
// Transfer currency to user
IERC20(_currency).safeTransfer(msg.sender, actualWithdrawAmount);
// update total token per user
totalVNDCPerUserMap[msg.sender][_currency] = totalVNDCPerUserMap[msg.sender][_currency].sub(_amountVNDC);
lpPerUser[msg.sender][_currency] = lpPerUser[msg.sender][_currency].sub(amountLiquidity);
// emit event
emit EventWithdrawWhitelist(
msg.sender,
amountLiquidity,
_currency,
amountVNDCWithdraw,
actualWithdrawAmount,
feeWithdraw
);
}
function estimateAmountByLp(address _currency, uint256 lpAmount) public view returns (uint256 VNDCAmount, uint256 currencyAmount) {
uint256 totalSupply = IERC20(address(lpPairMap[_currency])).totalSupply();
(uint256 VNDCReserve, uint256 currencyReserve) = getReserve(_currency);
VNDCAmount = lpAmount.mul(VNDCReserve).div(totalSupply);
currencyAmount = lpAmount.mul(currencyReserve).div(totalSupply);
}
function getReserve(address _currency) public view returns (uint256 VNDCReserve, uint256 currencyReserve) {
require(address(lpPairMap[_currency]) != address(0), 'LP not found');
(uint256 reserve0, uint256 reserve1, ) = lpPairMap[_currency].getReserves();
if (lpPairMap[_currency].token0() == address(this)) {
VNDCReserve = reserve0;
currencyReserve = reserve1;
} else {
VNDCReserve = reserve1;
currencyReserve = reserve0;
}
}
function getAmountLiquidity(uint256 VNDCAmount, address user, address currency) public view returns (uint256 liquidityAmount) {
return VNDCAmount.mul(lpPerUser[user][currency]).div(totalVNDCPerUserMap[user][currency]);
}
function addAdmin(address[] memory _admins, bool _isBool) public onlyOwner {
for (uint256 i = 0; i < _admins.length; i++) {
if (!adminMap[_admins[i]]) {
adminMap[_admins[i]] = _isBool;
}
}
}
function addWhitelist(address[] memory _whitelist, bool _mintable, bool _redeemable, uint256 _mintMax, address _currency) public isAdmin {
for (uint256 i = 0; i < _whitelist.length; i++) {
if (!whitelistMap[_currency][_whitelist[i]].active) {
users[_currency].push(_whitelist[i]);
}
whitelistMap[_currency][_whitelist[i]] = User({
mintMax: _mintMax,
mintable: _mintable,
redeemable: _redeemable,
lastMintTimestamp: whitelistMap[_currency][_whitelist[i]].lastMintTimestamp,
active: true
});
}
emit EventAddWhitelist(_whitelist, _mintable, _redeemable, _mintMax, _currency);
}
// Can use to pause mint/redeem
function setCurrencyList(address[] memory _currencyList, bool _isBool) public onlyOwner {
for (uint256 i = 0; i < _currencyList.length; i++) {
currencyList[_currencyList[i]] = _isBool;
}
}
function setMinAmountMint(uint256 _minAmountMint) public onlyOwner {
minAmountMint = _minAmountMint;
}
function setFeeWithdraw(uint256 _feeWithdraw) public onlyOwner {
feeWithdraw = _feeWithdraw;
}
function setBonus(uint256 _bonus) public onlyOwner {
bonus = _bonus;
}
function setMinSeconds(uint256 _minSeconds) public onlyOwner {
minMaxSetting.minSeconds = _minSeconds;
}
function setMinPriceMint(uint256 _minPriceMint) public onlyOwner {
minMaxSetting.minPriceMint = _minPriceMint;
}
function setMaxPriceRedeem(uint256 _maxPriceRedeem) public onlyOwner {
minMaxSetting.maxPriceRedeem = _maxPriceRedeem;
}
// Set router liquidity
function setRouter(address _router) public onlyOwner {
router = IPancakeRouter(_router);
}
// Set lp pair by currency address token
function setLpPair(address _currency, address _lpPair) public onlyOwner {
require(_lpPair != address(0), "_lpPair cannot be address(0)");
require(_currency != address(0), "_currency cannot be address(0)");
lpPairMap[_currency] = IPancakePair(_lpPair);
}
function withdrawEmergency(address _token, uint256 _amount) public onlyOwner {
IERC20(_token).safeTransfer(msg.sender, _amount);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override whenNotPaused {
super._beforeTokenTransfer(from, to, amount);
}
function decimals() public pure override returns (uint8) {
return 0;
}
function isAfterMintTime(uint256 timestamp) public view returns (bool) {
// Get the current timestamp
uint256 currentTime = block.timestamp;
// Calculate the difference in seconds between the current time and the given timestamp
uint256 difference = currentTime - timestamp;
// Check if the difference is more than minSeconds seconds
return difference >= minMaxSetting.minSeconds;
}
function getPriceInputVNDC(uint256 _amountVNDC, address _currency) public view returns (uint256) {
// get reserve
(uint256 VNDCReserve, uint256 currencyReserve) = getReserve(_currency);
// Get amount out
uint256 amountsOut = router.quote(_amountVNDC, VNDCReserve, currencyReserve);
uint256 currencyDecimals = uint256(ERC20(_currency).decimals());
uint256 price = _amountVNDC.mul(10**currencyDecimals).div(amountsOut);
return price;
}
function getPriceInputToken(uint256 _amount, address _currency) public view returns (uint256) {
// get reserve
(uint256 VNDCReserve, uint256 currencyReserve) = getReserve(_currency);
// Get amount out
uint256 amountsOut = router.quote(_amount, currencyReserve, VNDCReserve);
uint256 currencyDecimals = uint256(ERC20(_currency).decimals());
uint256 price = amountsOut.mul(10**currencyDecimals).div(_amount);
return price;
}
function getNumberOfUsers(address _currency) public view returns (uint256) {
return users[_currency].length;
}
}

@openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @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}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
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 Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
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`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}

@openzeppelin/contracts/security/Pausable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}

@openzeppelin/contracts/token/ERC20/ERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* 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}.
*
* 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 default value returned by this function, unless
* it's 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:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, 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}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, 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}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, 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) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, 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) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* 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:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, 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;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_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;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_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 Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - 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 {}
}

@openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)
pragma solidity ^0.8.0;
import "../ERC20.sol";
import "../../../utils/Context.sol";
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
_spendAllowance(account, _msgSender(), amount);
_burn(account, amount);
}
}

@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
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);
}

@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}

@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}

@openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}

@openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}

@openzeppelin/contracts/utils/math/SafeMath.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @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.
*/
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) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
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 multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
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
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
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 remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
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 addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (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.
*/
function sub(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.
*/
function mul(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.
*/
function div(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 (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
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}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, 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 invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(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}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_router","internalType":"address"},{"type":"uint256","name":"_minAmountMint","internalType":"uint256"},{"type":"uint256","name":"_feeWithdraw","internalType":"uint256"},{"type":"uint256","name":"_bonus","internalType":"uint256"},{"type":"uint256","name":"_minPriceMint","internalType":"uint256"},{"type":"uint256","name":"_maxPriceRedeem","internalType":"uint256"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EventAddWhitelist","inputs":[{"type":"address[]","name":"_whitelist","internalType":"address[]","indexed":false},{"type":"bool","name":"_mintable","internalType":"bool","indexed":false},{"type":"bool","name":"_redeemable","internalType":"bool","indexed":false},{"type":"uint256","name":"_mintMax","internalType":"uint256","indexed":false},{"type":"address","name":"_currency","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"EventMintWhitelist","inputs":[{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"address","name":"currency","internalType":"address","indexed":true},{"type":"uint256","name":"amountsOut","internalType":"uint256","indexed":false},{"type":"uint256","name":"liquidity","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"EventWithdrawWhitelist","inputs":[{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amountLiquidty","internalType":"uint256","indexed":false},{"type":"address","name":"currency","internalType":"address","indexed":true},{"type":"uint256","name":"amountAWithdraw","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountBWithdraw","internalType":"uint256","indexed":false},{"type":"uint256","name":"feeWithdraw","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BASE_RATE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addAdmin","inputs":[{"type":"address[]","name":"_admins","internalType":"address[]"},{"type":"bool","name":"_isBool","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addWhitelist","inputs":[{"type":"address[]","name":"_whitelist","internalType":"address[]"},{"type":"bool","name":"_mintable","internalType":"bool"},{"type":"bool","name":"_redeemable","internalType":"bool"},{"type":"uint256","name":"_mintMax","internalType":"uint256"},{"type":"address","name":"_currency","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"adminMap","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bonus","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burnFrom","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"currencyList","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"VNDCAmount","internalType":"uint256"},{"type":"uint256","name":"currencyAmount","internalType":"uint256"}],"name":"estimateAmountByLp","inputs":[{"type":"address","name":"_currency","internalType":"address"},{"type":"uint256","name":"lpAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feeWithdraw","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"liquidityAmount","internalType":"uint256"}],"name":"getAmountLiquidity","inputs":[{"type":"uint256","name":"VNDCAmount","internalType":"uint256"},{"type":"address","name":"user","internalType":"address"},{"type":"address","name":"currency","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getNumberOfUsers","inputs":[{"type":"address","name":"_currency","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPriceInputToken","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"address","name":"_currency","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPriceInputVNDC","inputs":[{"type":"uint256","name":"_amountVNDC","internalType":"uint256"},{"type":"address","name":"_currency","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"VNDCReserve","internalType":"uint256"},{"type":"uint256","name":"currencyReserve","internalType":"uint256"}],"name":"getReserve","inputs":[{"type":"address","name":"_currency","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isAfterMintTime","inputs":[{"type":"uint256","name":"timestamp","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IPancakePair"}],"name":"lpPairMap","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lpPerUser","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minAmountMint","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"minPriceMint","internalType":"uint256"},{"type":"uint256","name":"maxPriceRedeem","internalType":"uint256"},{"type":"uint256","name":"minSeconds","internalType":"uint256"}],"name":"minMaxSetting","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mintWhitelist","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"address","name":"_currency","internalType":"address"},{"type":"uint256","name":"slippage","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IPancakeRouter"}],"name":"router","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBonus","inputs":[{"type":"uint256","name":"_bonus","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCurrencyList","inputs":[{"type":"address[]","name":"_currencyList","internalType":"address[]"},{"type":"bool","name":"_isBool","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeeWithdraw","inputs":[{"type":"uint256","name":"_feeWithdraw","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLpPair","inputs":[{"type":"address","name":"_currency","internalType":"address"},{"type":"address","name":"_lpPair","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxPriceRedeem","inputs":[{"type":"uint256","name":"_maxPriceRedeem","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMinAmountMint","inputs":[{"type":"uint256","name":"_minAmountMint","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMinPriceMint","inputs":[{"type":"uint256","name":"_minPriceMint","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMinSeconds","inputs":[{"type":"uint256","name":"_minSeconds","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRouter","inputs":[{"type":"address","name":"_router","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalTokenPerUserMap","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalVNDCPerUserMap","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"users","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"mintMax","internalType":"uint256"},{"type":"bool","name":"mintable","internalType":"bool"},{"type":"bool","name":"redeemable","internalType":"bool"},{"type":"uint256","name":"lastMintTimestamp","internalType":"uint256"},{"type":"bool","name":"active","internalType":"bool"}],"name":"whitelistMap","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawEmergency","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawWhitelist","inputs":[{"type":"uint256","name":"_amountVNDC","internalType":"uint256"},{"type":"address","name":"_currency","internalType":"address"},{"type":"uint256","name":"_slippage","internalType":"uint256"}]}]
            

Deployed ByteCode

0x608080604052600436101561001357600080fd5b60003560e01c90816306fdde03146127f457508063095ea7b3146127b05780630b98f9751461277157806312a7b3031461273257806318160ddd146126f65780631e7fe73b146126b757806323b872dd14612661578063313ce567146126275780633367dc0a146125e85780633909a4f9146125a357806339509351146125265780633e5a9a85146124a95780633f4ba83a146123b75780633f6c7d4c1461235157806341910f901461231657806342966c68146122db5780634e27f3a11461217857806354a02f9e146120f35780635c975abb146120b25780636561e6ba1461207657806369e5795a146120375780636c3d7e1d14611fd457806370a0823114611f6f5780637114b7e814611f2b578063715018a614611e8a5780637390cb6a14611dfc57806375b4d78c14611dc057806379cc679014611d725780638456cb5914611cdc578063851d585e14611c775780638c471d1d146118295780638da5cb5b146117d45780639002a7331461178457806395d89b411461162a5780639d256d0d146115ee5780639fffbae714611584578063a457c2d714611480578063a9059cbb14611431578063c0d78655146113ae578063c1efeebe14611364578063c1f27214146112fd578063c9a396e9146112b0578063da314b4514611233578063dbbc830b146111c9578063dd62ed3e1461114c578063dda66a40146110cf578063de3233c414611083578063e02296af14610fce578063e0fb746314610f8f578063e7c9cb6114610998578063eb849108146108d4578063f2fde38b14610782578063f887ea40146107305763fe30fd201461027157600080fd5b3461072b5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760043567ffffffffffffffff811161072b576102c0903690600401612a01565b60243590811515820361072b57604435801515810361072b576084359173ffffffffffffffffffffffffffffffffffffffff8316830361072b5733600052600c60205260ff604060002054168015610707575b156106a95760005b81518110156105f95773ffffffffffffffffffffffffffffffffffffffff8416600052600b602052604060002073ffffffffffffffffffffffffffffffffffffffff6103678385613ba5565b511660005260205260ff6003604060002001541615610565575b73ffffffffffffffffffffffffffffffffffffffff8416600052600b602052604060002073ffffffffffffffffffffffffffffffffffffffff6103c48385613ba5565b511660005260205260026040600020015490604051918260a081011067ffffffffffffffff60a0850111176105365782600361052c9260a06105319601604052606435835260208301908a15158252604084019189151583526060850191825260808501926104be8c73ffffffffffffffffffffffffffffffffffffffff60019182885216600052600b6020528b73ffffffffffffffffffffffffffffffffffffffff6104768c604060002093613ba5565b5116600052602052604060002097518855870192511515839060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b5115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff61ff0083549260081b16911617905551600284015551151591019060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b613b78565b61031b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8416600052600a602052604060002073ffffffffffffffffffffffffffffffffffffffff6105a88385613ba5565b511690805468010000000000000000811015610536576105cd91600182018155612979565b73ffffffffffffffffffffffffffffffffffffffff829392549160031b92831b921b1916179055610381565b509291906040519260a0840160a085528551809152602060c0860196019060005b81811061067d5783151560208801528415156040880152606435606088015273ffffffffffffffffffffffffffffffffffffffff861660808801527fdb0b7beb9e8901cfc3f0c4e37507645334b52f775ff52dcc08cfb227757322c587890388a1005b825173ffffffffffffffffffffffffffffffffffffffff1688526020978801979092019160010161061a565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f43616c6c6572206973206e6f742061646d696e000000000000000000000000006044820152fd5b5073ffffffffffffffffffffffffffffffffffffffff60055460081c163314610313565b600080fd5b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57602073ffffffffffffffffffffffffffffffffffffffff60065416604051908152f35b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576107b9612933565b6107c1612b33565b73ffffffffffffffffffffffffffffffffffffffff8082169182156108505774ffffffffffffffffffffffffffffffffffffffff006005549160081b167fffffffffffffffffffffff0000000000000000000000000000000000000000ff82161760055560081c167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b3461072b576108e236612a85565b906108eb612b33565b60005b8151811015610996576109409073ffffffffffffffffffffffffffffffffffffffff8061091b8386613ba5565b5116600052600c9060209082825260ff6040600020541615610945575b505050613b78565b6108ee565b61094f8487613ba5565b51166000525261098e8460406000209060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b848080610938565b005b3461072b576109a636612ade565b909173ffffffffffffffffffffffffffffffffffffffff8084169283600052602090600b825260406000203360005282526109eb60ff6001604060002001541661321a565b6009548410610f0b578460005260088252610a0d60ff6040600020541661327f565b84600052600b82526040600020336000528252610a44604060002054600e8452604060002087600052845260406000205490613774565b8411610e87578582610a5a610aa796979861391f565b8660065416906040518099819482937fad615dec0000000000000000000000000000000000000000000000000000000084528d600485016040919493926060820195825260208201520152565b03915afa948515610d9757600095610e56575b50610ac59086613d23565b6012541015610dd2576040517f23b872dd00000000000000000000000000000000000000000000000000000000838201523360248201523060448201528560648201526064815260a081019080821067ffffffffffffffff83111761053657610b3191604052876134e6565b6103e890610b5f82610b58610b5182610b4a868b613781565b0489613774565b9389613781565b0487613774565b93610b6a86306132e4565b610b798782600654168a6133b5565b610b88868260065416306133b5565b6006541690610e104201804211610da35788600060609461010493604051998a9687957fe8e3370000000000000000000000000000000000000000000000000000000000875230600488015260248701528c60448701528d6064870152608486015260a48501523060c485015260e48401525af1928315610d9757600093610d3d575b509083610d2392610c3f7f9119b9da5ed5d833d25b7603afb5be5a7e8b6bf67da46203e012af8115f4840d96601154613781565b0491610c54610c4e8484612bb5565b336132e4565b33600052600d81526040600020886000528152610c7682604060002054612bb5565b33600052600d8252604060002089600052825260406000205533600052600e81526040600020886000528152610cb187604060002054612bb5565b33600052600e8252604060002089600052825260406000205533600052600f81526040600020886000528152610cec85604060002054612bb5565b33600052600f82526040600020896000528252604060002055600b8152604060002090336000525242600260406000200155612bb5565b6040805194855260208501919091528301523391606090a3005b919092506060823d8211610d8f575b81610d59606093836129c0565b8101031261072b5760409190910151917f9119b9da5ed5d833d25b7603afb5be5a7e8b6bf67da46203e012af8115f4840d610c0b565b3d9150610d4c565b6040513d6000823e3d90fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b608482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602860248201527f546865207072696365206d757374206265206d6f7265207468616e206d696e5060448201527f726963654d696e740000000000000000000000000000000000000000000000006064820152fd5b9094508281813d8311610e80575b610e6e81836129c0565b8101031261072b575193610ac5610aba565b503d610e64565b608482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602960248201527f416d6f756e7473206d757374206265206c657373207468616e206d6178696d7560448201527f6d206d696e74696e6700000000000000000000000000000000000000000000006064820152fd5b608482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602760248201527f416d6f756e7473206d7573742062652067726561746572207468616e206d696e60448201527f20616d6f756e74000000000000000000000000000000000000000000000000006064820152fd5b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57610fc6612b33565b600435601055005b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57611005612933565b61100d612956565b9073ffffffffffffffffffffffffffffffffffffffff809116600052600b6020526040600020911660005260205260a0604060002080549060018101549060ff806003600284015493015416926040519485528181161515602086015260081c1615156040840152606083015215156080820152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760206110c76110bf612956565b600435613d23565b604051908152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57611106612933565b61110e612956565b9073ffffffffffffffffffffffffffffffffffffffff809116600052600d602052604060002091166000526020526020604060002054604051908152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57611183612933565b61118b612956565b9073ffffffffffffffffffffffffffffffffffffffff8091166000526001602052604060002091166000526020526020604060002054604051908152f35b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5773ffffffffffffffffffffffffffffffffffffffff611215612933565b16600052600c602052602060ff604060002054166040519015158152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5761126a612933565b611272612956565b9073ffffffffffffffffffffffffffffffffffffffff809116600052600e602052604060002091166000526020526020604060002054604051908152f35b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760406112f16112ec612933565b61391f565b82519182526020820152f35b3461072b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57611334612956565b6044359073ffffffffffffffffffffffffffffffffffffffff8216820361072b576020916110c791600435613b1a565b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760206113a160043542613774565b6014541115604051908152f35b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5773ffffffffffffffffffffffffffffffffffffffff6113fa612933565b611402612b33565b167fffffffffffffffffffffffff00000000000000000000000000000000000000006006541617600655600080f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5761147561146b612933565b6024359033612bc2565b602060405160018152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576114b7612933565b60243590336000526001602052604060002073ffffffffffffffffffffffffffffffffffffffff8216600052602052604060002054918083106115005761147592039033612dd9565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5773ffffffffffffffffffffffffffffffffffffffff6115d0612933565b166000526008602052602060ff604060002054166040519015158152f35b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576020600954604051908152f35b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57604051600090600454600181811c9080831692831561177a575b602093848410811461174b5783865290811561170d57506001146116b2575b6116ae846116a2818803826129c0565b604051918291826128cd565b0390f35b600460009081529294507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106116fa57505050816116ae936116a29282010193611692565b80548585018701529285019281016116de565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016858501525050151560051b82010191506116a2816116ae611692565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611673565b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760125460135460145460408051938452602084019290925290820152606090f35b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57602073ffffffffffffffffffffffffffffffffffffffff60055460081c16604051908152f35b3461072b5761183736612ade565b9173ffffffffffffffffffffffffffffffffffffffff8083169384600052602092600b8452604060002033600052845261187e60ff60016040600020015460081c1661321a565b33600052600d845260406000208660005284526040600020548111611bf45785600052600b845260406000203360005284526118c260026040600020015442613774565b60145411611b965785600052600884526118e360ff6040600020541661327f565b6118ed8582613be0565b6013541115611b12579061192f9161193661191361190c883385613b1a565b809861382c565b906119286103e8968288611928898296613781565b0490613774565b9583613781565b87600052600786526119558786604060002054168760065416906133b5565b846006541690610e10420191824211610da35789600060e4926040958c958751998a9788967fbaa2abde00000000000000000000000000000000000000000000000000000000885230600489015260248801526044870152606486015260848501523060a485015260c48401525af1928315610d9757600092600094611ad5575b508293611a0b611a19926119ed611a42963061302b565b6119f7853361302b565b611a0360105484613781565b048092613774565b9560055460081c16896137cd565b611a248433896137cd565b33600052600d85526040600020876000528552604060002054613774565b33600052600d8452604060002086600052845260406000205533600052600f83526040600020856000528352611a7d84604060002054613774565b33600052600f8452604060002086600052845260406000205560105492604051948552840152604083015260608201527fee104db6fe723e6fec152f4cc78f7ed1b67395680e9fd5fb9e5bde32e252afb960803392a3005b935091506040833d604011611b0a575b81611af2604093836129c0565b8101031261072b578251928501519291611a196119d6565b3d9150611ae5565b608484604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f546865207072696365206d757374206265206c657373207468616e206d61785060448201527f7269636552656465656d000000000000000000000000000000000000000000006064820152fd5b606484604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601760248201527f596f75206d757374207761697420746f2072656465656d0000000000000000006044820152fd5b608484604051907f08c379a000000000000000000000000000000000000000000000000000000000825260048201526024808201527f416d6f756e7473206d757374206265206c657373207468616e20746f74616c2060448201527f564e4443000000000000000000000000000000000000000000000000000000006064820152fd5b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5773ffffffffffffffffffffffffffffffffffffffff611cc3612933565b16600052600a6020526020604060002054604051908152f35b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57611d13612b33565b611d1b6131b0565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0060055416176005557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57610996611dac612933565b60243590611dbb823383612f4e565b61302b565b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576020601154604051908152f35b3461072b57611e0a36612a85565b90611e13612b33565b60005b8151811015610996578073ffffffffffffffffffffffffffffffffffffffff611e42611e859385613ba5565b5116600052600860205261052c8460406000209060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b611e16565b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57611ec1612b33565b600073ffffffffffffffffffffffffffffffffffffffff6005547fffffffffffffffffffffff0000000000000000000000000000000000000000ff811660055560081c167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760206110c7611f67612956565b600435613be0565b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5773ffffffffffffffffffffffffffffffffffffffff611fbb612933565b1660005260006020526020604060002054604051908152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5761099661200e612933565b612016612b33565b6024359073ffffffffffffffffffffffffffffffffffffffff3391166137cd565b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5761206e612b33565b600435601455005b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576020601054604051908152f35b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57602060ff600554166040519015158152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5761212a612933565b6024359073ffffffffffffffffffffffffffffffffffffffff809116600052600a6020526040600020805483101561072b5760209261216891612979565b9190546040519260031b1c168152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576121af612933565b6121b7612956565b6121bf612b33565b73ffffffffffffffffffffffffffffffffffffffff80911691821561227d5716801561221f5760005260076020526040600020907fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055600080f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5f63757272656e63792063616e6e6f74206265206164647265737328302900006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f5f6c70506169722063616e6e6f742062652061646472657373283029000000006044820152fd5b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576109966004353361302b565b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760206040516103e88152f35b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57602073ffffffffffffffffffffffffffffffffffffffff806123a0612933565b166000526007825260406000205416604051908152f35b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576123ee612b33565b60055460ff81161561244b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166005557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576124e0612933565b6124e8612956565b9073ffffffffffffffffffffffffffffffffffffffff809116600052600f602052604060002091166000526020526020604060002054604051908152f35b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57611475612560612933565b336000526001602052604060002073ffffffffffffffffffffffffffffffffffffffff821660005260205261259c602435604060002054612bb5565b9033612dd9565b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5760406112f16125df612933565b6024359061382c565b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5761261f612b33565b600435601255005b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57602060405160008152f35b3461072b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b5761147561269b612933565b6126a3612956565b604435916126b2833383612f4e565b612bc2565b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576126ee612b33565b600435601355005b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576020600254604051908152f35b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57612769612b33565b600435600955005b3461072b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576127a8612b33565b600435601155005b3461072b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b576114756127ea612933565b6024359033612dd9565b3461072b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261072b57600090600354600181811c908083169283156128c3575b602093848410811461174b5783865290811561170d5750600114612868576116ae846116a2818803826129c0565b600360009081529294507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106128b057505050816116ae936116a29282010193611692565b8054858501870152928501928101612894565b91607f169161283a565b60208082528251818301819052939260005b85811061291f575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b8181018301518482016040015282016128df565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361072b57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361072b57565b80548210156129915760005260206000200190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761053657604052565b9080601f8301121561072b5781359067ffffffffffffffff8211610536578160051b60405193602093612a36858401876129c0565b8552838086019282010192831161072b578301905b828210612a59575050505090565b813573ffffffffffffffffffffffffffffffffffffffff8116810361072b578152908301908301612a4b565b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261072b576004359067ffffffffffffffff821161072b57612ace91600401612a01565b90602435801515810361072b5790565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261072b576004359060243573ffffffffffffffffffffffffffffffffffffffff8116810361072b579060443590565b73ffffffffffffffffffffffffffffffffffffffff60055460081c163303612b5757565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b91908201809211610da357565b73ffffffffffffffffffffffffffffffffffffffff809116918215612d555716918215612cd157612bf16131b0565b600082815280602052604081205491808310612c4d57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116918215612ecb5716918215612e475760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b9073ffffffffffffffffffffffffffffffffffffffff80831660005260016020526040600020908216600052602052604060002054927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8403612fb2575b50505050565b808410612fcd57612fc4930391612dd9565b38808080612fac565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b73ffffffffffffffffffffffffffffffffffffffff16801561312c5761304f6131b0565b6000918183528260205260408320548181106130a857817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef926020928587528684520360408620558060025403600255604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b60ff600554166131bc57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b1561322157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616c6c6572206973206e6f742077686974656c6973740000000000000000006044820152fd5b1561328657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43757272656e6379206973206e6f7420737570706f72740000000000000000006044820152fd5b73ffffffffffffffffffffffffffffffffffffffff16908115613357577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602060009261332f6131b0565b61333b81600254612bb5565b60025584845283825260408420818154019055604051908152a3565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b9291926040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015260208160448173ffffffffffffffffffffffffffffffffffffffff808816602483015286165afa908115610d97576000916134b0575b5061342c6134ae94956134a992612bb5565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9094166024850152604484015282606481015b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081018452836129c0565b6134e6565b565b906020823d82116134de575b816134c9602093836129c0565b810103126134db57505161342c61341a565b80fd5b3d91506134bc565b73ffffffffffffffffffffffffffffffffffffffff16906040516040810167ffffffffffffffff9082811082821117610536576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d156136a1573d92831161367457906135ad939291604051926135a0887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601856129c0565b83523d868885013e6136ac565b80519182159184831561364c575b5050509050156135c85750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b919381809450010312613670578201519081151582036134db5750803880846135bb565b5080fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b906135ad9392506060915b9192901561372757508151156136c0575090565b3b156136c95790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561373a5750805190602001fd5b613770906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352600483016128cd565b0390fd5b91908203918211610da357565b81810292918115918404141715610da357565b811561379e570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff909216602483015260448201929092526134ae916134a9826064810161347d565b91909173ffffffffffffffffffffffffffffffffffffffff60046020600092808516845260078252604084205416604051928380927f18160ddd0000000000000000000000000000000000000000000000000000000082525afa9182156138f85780926138c2575b50506138b46138b46138b9836138ac6138bf9661391f565b939089613781565b613794565b95613781565b90565b9091506020823d82116138f0575b816138dd602093836129c0565b810103126134db5750516138b480613894565b3d91506138d0565b604051903d90823e3d90fd5b51906dffffffffffffffffffffffffffff8216820361072b57565b9073ffffffffffffffffffffffffffffffffffffffff809216916000908382526020916007835260409282848320541615613abd579060049392918682526007815260608385842054168551968780927f0902f1ac0000000000000000000000000000000000000000000000000000000082525afa948515613ab35782908396613a59575b50906004916dffffffffffffffffffffffffffff809116961697835260078152808486852054168651938480927f0dfe16810000000000000000000000000000000000000000000000000000000082525afa948515613a5057508294613a13575b5050501630036138bf579190565b908092939450813d8311613a49575b613a2c81836129c0565b8101031261367057519082821682036134db575090388080613a05565b503d613a22565b513d84823e3d90fd5b9550506060853d8211613aab575b81613a74606093836129c0565b8101031261367057613a8585613904565b84613a91838801613904565b96015163ffffffff811603613aa75760046139a4565b8280fd5b3d9150613a67565b84513d84823e3d90fd5b6064908451907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152600c60248201527f4c50206e6f7420666f756e6400000000000000000000000000000000000000006044820152fd5b906040906138bf93613b5f73ffffffffffffffffffffffffffffffffffffffff80931694600093868552600f6020528585209316928385526020528484205490613781565b938252600d602052828220908252602052205490613794565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610da35760010190565b80518210156129915760209160051b010190565b9081602091031261072b575160ff8116810361072b5790565b604d8111610da357600a0a90565b90613bea8161391f565b9273ffffffffffffffffffffffffffffffffffffffff9182600654169060405180927fad615dec0000000000000000000000000000000000000000000000000000000082528180613c5460209a8b9689600485016040919493926060820195825260208201520152565b03915afa938415610d97578591600095613cf1575b506004604051809581937f313ce567000000000000000000000000000000000000000000000000000000008352165afa918215610d975760ff6138b493613cbe926138bf97600092613cc4575b505016613bd2565b90613781565b613ce39250803d10613cea575b613cdb81836129c0565b810190613bb9565b3880613cb6565b503d613cd1565b9182819692963d8311613d1c575b613d0981836129c0565b810103126134db57508490519338613c69565b503d613cff565b613d2c8261391f565b909273ffffffffffffffffffffffffffffffffffffffff9182600654169060405180927fad615dec0000000000000000000000000000000000000000000000000000000082528180613d9760209a8b968b600485016040919493926060820195825260208201520152565b03915afa918215610d97578591600093613dff57506004604051809581937f313ce567000000000000000000000000000000000000000000000000000000008352165afa918215610d975760ff6138b493613cbe926138bf97600092613cc457505016613bd2565b9182819492943d8311613e2a575b613e1781836129c0565b810103126134db57508490519138613c69565b503d613e0d56fea264697066735822122039eff34361556f9ad60af6ea8920969b207ad4c2cece061ed109a67eedb8dd6d64736f6c63430008120033