Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 13,124 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Approve | 30167305 | 46 hrs ago | IN | 0 ETH | 0.00000007 | ||||
| Vest | 30166870 | 47 hrs ago | IN | 0 ETH | 0.00000005 | ||||
| Vest | 30152854 | 2 days ago | IN | 0 ETH | 0.0000001 | ||||
| Claim | 30152822 | 2 days ago | IN | 0 ETH | 0.00000012 | ||||
| Approve | 30144593 | 2 days ago | IN | 0 ETH | 0.00000456 | ||||
| Approve | 30144346 | 2 days ago | IN | 0 ETH | 0.0000046 | ||||
| Claim | 29794338 | 10 days ago | IN | 0 ETH | 0.00001192 | ||||
| Claim | 29794334 | 10 days ago | IN | 0 ETH | 0.00001217 | ||||
| Claim | 29794330 | 10 days ago | IN | 0 ETH | 0.00001217 | ||||
| Claim | 29794323 | 10 days ago | IN | 0 ETH | 0.00001223 | ||||
| Claim | 29794319 | 10 days ago | IN | 0 ETH | 0.00001223 | ||||
| Claim | 29794315 | 10 days ago | IN | 0 ETH | 0.00001217 | ||||
| Claim | 29794311 | 10 days ago | IN | 0 ETH | 0.00001217 | ||||
| Claim | 29794308 | 10 days ago | IN | 0 ETH | 0.00001214 | ||||
| Claim | 29794303 | 10 days ago | IN | 0 ETH | 0.0000121 | ||||
| Claim | 29794299 | 10 days ago | IN | 0 ETH | 0.00001209 | ||||
| Claim | 29794292 | 10 days ago | IN | 0 ETH | 0.00001206 | ||||
| Claim | 29794287 | 10 days ago | IN | 0 ETH | 0.00001206 | ||||
| Claim | 29794283 | 10 days ago | IN | 0 ETH | 0.00001201 | ||||
| Claim | 29794276 | 10 days ago | IN | 0 ETH | 0.000012 | ||||
| Claim | 29794268 | 10 days ago | IN | 0 ETH | 0.0000119 | ||||
| Claim | 29794263 | 10 days ago | IN | 0 ETH | 0.0000119 | ||||
| Claim | 29794259 | 10 days ago | IN | 0 ETH | 0.00001189 | ||||
| Claim | 29791118 | 10 days ago | IN | 0 ETH | 0.00001258 | ||||
| Claim | 29791114 | 10 days ago | IN | 0 ETH | 0.00001514 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
xSBF
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 50 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import './helpers/ReentrancyGuard.sol';
interface IMasterChef {
function mintRewards(address _receiver, uint256 _amount) external;
}
import "../interfaces/IBlast.sol";
contract xSBF is ERC20("xSwapBlast Finance Token", "xSBF"), Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using SafeMath for uint256;
IUniswapV2Pair public uniswapV2Pair;
uint256 public constant PRECISION = 100;
bool public optionEnabled = true;
address public weth;
address public sbfToken;
uint256 public rewardRate;
address public masterChef;
address public _operator;
uint256 public exitRatio = 30; // get 30% liquid
uint256 public exitRatioBond = 150; // 1.5x
address public constant BLAST_CONTRACT = 0x4300000000000000000000000000000000000002;
IERC20Rebasing public constant USDB = IERC20Rebasing(0x4300000000000000000000000000000000000003);
IERC20Rebasing public constant WETH = IERC20Rebasing(0x4300000000000000000000000000000000000004);
mapping(address => bool) public minters;
constructor(IUniswapV2Pair _uniswapV2Pair, address _weth, address _sbfToken) {
_operator = msg.sender;
uniswapV2Pair = _uniswapV2Pair;
weth = _weth;
sbfToken = _sbfToken;
IBlast(BLAST_CONTRACT).configureClaimableYield();
IBlast(BLAST_CONTRACT).configureClaimableGas();
IBlast(BLAST_CONTRACT).configureGovernor(msg.sender);
USDB.configure(IERC20Rebasing.YieldMode.CLAIMABLE); //configure claimable yield for USDB
WETH.configure(IERC20Rebasing.YieldMode.CLAIMABLE); //configure claimable yield for WETH
}
modifier onlyMinter() {
require(minters[msg.sender] == true, "Only minters allowed");
_;
}
modifier onlyMasterChef() {
require(msg.sender == masterChef, "Caller is not MasterChef contract");
_;
}
modifier onlyOperator() {
require(_operator == msg.sender, "operator: caller is not the operator");
_;
}
struct vestPosition {
uint256 totalVested;
uint256 lastInteractionTime;
uint256 VestPeriod;
}
mapping (address => vestPosition[]) public userInfo;
mapping (address => uint256) public userPositions;
uint256 public vestingPeriod = 60 days;
uint256 public bondVestingPeriod = 150 days;
function mint(address recipient_, uint256 amount_) external onlyMinter returns (bool) {
_mint(recipient_, amount_);
return true;
}
function burn(uint256 _amount) external {
_burn(msg.sender, _amount);
}
function remainTime(address _address, uint256 id) public view returns(uint256) {
uint256 timePass = block.timestamp.sub(userInfo[_address][id].lastInteractionTime);
uint256 remain;
if (timePass >= userInfo[msg.sender][id].VestPeriod){
remain = 0;
}
else {
remain = userInfo[msg.sender][id].VestPeriod- timePass;
}
return remain;
}
function vest(uint256 _amount) external nonReentrant {
require(this.balanceOf(msg.sender) >= _amount, "xSBF balance too low");
userInfo[msg.sender].push(vestPosition({
totalVested: _amount,
lastInteractionTime: block.timestamp,
VestPeriod: vestingPeriod
}));
userPositions[msg.sender] += 1;
_burn(msg.sender, _amount);
}
function vestBond(uint256 _amount) external nonReentrant {
require(this.balanceOf(msg.sender) >= _amount, "xSBF balance too low");
userInfo[msg.sender].push(vestPosition({
totalVested: _amount.mul(exitRatioBond).div(100),
lastInteractionTime: block.timestamp,
VestPeriod: bondVestingPeriod
}));
userPositions[msg.sender] += 1;
_burn(msg.sender, _amount);
}
/**
* @dev exit instantly with a penalty
* @param _amount amount of xSBF to exit
* @param maxPayAmount maximum amount of eth user is willing to pay
*/
function instantExit(
uint256 _amount,
uint256 maxPayAmount
) external nonReentrant {
require(_amount > 0, "xSBF: Amount must be greater than 0");
uint256 exitAmount = ((exitRatio * _amount) / PRECISION);
_burn(msg.sender, _amount);
uint256 amountToPay = (_amount * (100 - exitRatio)) / 100;
amountToPay = (getSBFCurrentPrice() * amountToPay) / 1e18;
require(amountToPay <= maxPayAmount, "Slippage!");
IERC20(weth).transferFrom(
msg.sender,
_operator,
amountToPay
);
exitAmount = _amount;
IMasterChef(masterChef).mintRewards(msg.sender, exitAmount);
}
function quotePayment(
uint256 amount
) public view returns (uint256 payAmount) {
uint256 amountToPay = (amount * (100 - exitRatio)) / 100;
payAmount = (getSBFCurrentPrice() * amountToPay) / 1e18;
}
function getSBFCurrentPrice() public view returns (uint256) {
// Get reserves of token0 and token1
(uint256 reserve0, uint256 reserve1, ) = uniswapV2Pair.getReserves();
// Assume token0 is the ERC-20 token you are interested in
address token0 = sbfToken;
if (token0 == uniswapV2Pair.token1()) {
return reserve0 * (10**18) / reserve1;
} else {
return reserve1 * (10**18) / reserve0;
}
}
function claim(uint256 id) external nonReentrant {
require(remainTime(msg.sender, id) == 0, "vesting not end");
vestPosition storage position = userInfo[msg.sender][id];
uint256 claimAmount = position.totalVested;
position.totalVested = 0;
IMasterChef(masterChef).mintRewards(msg.sender, claimAmount);
}
function setRewardRate(uint256 _rewardRate) public onlyMasterChef {
rewardRate = _rewardRate;
}
function setMasterChef(address _masterChef) public onlyOwner {
masterChef = _masterChef;
}
function transferOperator(address newOperator_) public onlyOwner {
_transferOperator(newOperator_);
}
function setExitRatio(uint256 _exitRatio, uint256 _exitRatioBond) public onlyOwner {
require(_exitRatio <= 95, "Cant be more than 80");
require(_exitRatio >= 5, "Cant be less than 20");
require(_exitRatioBond <= 500, "Cant be more than 500");
require(_exitRatioBond >= 100, "Cant be less than 100");
exitRatio = _exitRatio;
exitRatioBond = _exitRatioBond;
}
function _transferOperator(address newOperator_) internal {
require(newOperator_ != address(0), "operator: zero address given for new operator");
_operator = newOperator_;
}
function setMinters(address _minter, bool _canMint) public onlyOperator {
minters[_minter] = _canMint;
}
/*********************** BLAST RELATED ***********************/
function configureYieldModeTokens(IERC20Rebasing.YieldMode _weth, IERC20Rebasing.YieldMode _usdb) external onlyOwner {
USDB.configure(_usdb); //configure claimable yield for USDB
WETH.configure(_weth); //configure claimable yield for WETH
}
function claimYieldTokens(address recipient, uint256 amount) external onlyOwner {
USDB.claim(recipient, amount); //configure claimable yield for USDB
WETH.claim(recipient, amount); //configure claimable yield for WETH
}
function claimYield(address recipient, uint256 amount) external onlyOwner {
IBlast(BLAST_CONTRACT).claimYield(address(this), recipient, amount);
}
function claimAllYield(address recipient) external onlyOwner {
IBlast(BLAST_CONTRACT).claimAllYield(address(this), recipient);
}
function claimMyContractsGas() external onlyOwner {
IBlast(BLAST_CONTRACT).claimAllGas(address(this), msg.sender);
}
}// 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);
}
}// 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 {}
}// 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);
}// 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);
}// 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);
}// 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));
}
}// 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);
}
}
}// 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;
}
}// 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;
}
}
}pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;
interface IBlast{
enum YieldMode {
AUTOMATIC,
VOID,
CLAIMABLE
}
enum GasMode {
VOID,
CLAIMABLE
}
// configure
function configureContract(address contractAddress, YieldMode _yield, GasMode gasMode, address governor) external;
function configure(YieldMode _yield, GasMode gasMode, address governor) external;
// base configuration options
function configureClaimableYield() external;
function configureClaimableYieldOnBehalf(address contractAddress) external;
function configureAutomaticYield() external;
function configureAutomaticYieldOnBehalf(address contractAddress) external;
function configureVoidYield() external;
function configureVoidYieldOnBehalf(address contractAddress) external;
function configureClaimableGas() external;
function configureClaimableGasOnBehalf(address contractAddress) external;
function configureVoidGas() external;
function configureVoidGasOnBehalf(address contractAddress) external;
function configureGovernor(address _governor) external;
function configureGovernorOnBehalf(address _newGovernor, address contractAddress) external;
// claim yield
function claimYield(address contractAddress, address recipientOfYield, uint256 amount) external returns (uint256);
function claimAllYield(address contractAddress, address recipientOfYield) external returns (uint256);
// claim gas
function claimAllGas(address contractAddress, address recipientOfGas) external returns (uint256);
function claimGasAtMinClaimRate(address contractAddress, address recipientOfGas, uint256 minClaimRateBips) external returns (uint256);
function claimMaxGas(address contractAddress, address recipientOfGas) external returns (uint256);
function claimGas(address contractAddress, address recipientOfGas, uint256 gasToClaim, uint256 gasSecondsToConsume) external returns (uint256);
// read functions
function readClaimableYield(address contractAddress) external view returns (uint256);
function readYieldConfiguration(address contractAddress) external view returns (uint8);
function readGasParams(address contractAddress) external view returns (uint256 etherSeconds, uint256 etherBalance, uint256 lastUpdated, GasMode);
}
interface IERC20Rebasing {
enum YieldMode {
AUTOMATIC,
VOID,
CLAIMABLE
}
// changes the yield mode of the caller and update the balance
// to reflect the configuration
function configure(YieldMode) external returns (uint256);
// "claimable" yield mode accounts can call this this claim their yield
// to another address
function claim(address recipient, uint256 amount) external returns (uint256);
// read the claimable amount for an account
function getClaimableAmount(address account) external view returns (uint256);
}// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}{
"optimizer": {
"enabled": true,
"runs": 50
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IUniswapV2Pair","name":"_uniswapV2Pair","type":"address"},{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_sbfToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BLAST_CONTRACT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDB","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondVestingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"claimAllYield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimMyContractsGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimYield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimYieldTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IERC20Rebasing.YieldMode","name":"_weth","type":"uint8"},{"internalType":"enum IERC20Rebasing.YieldMode","name":"_usdb","type":"uint8"}],"name":"configureYieldModeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exitRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exitRatioBond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSBFCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"maxPayAmount","type":"uint256"}],"name":"instantExit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"masterChef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"optionEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"quotePayment","outputs":[{"internalType":"uint256","name":"payAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"remainTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sbfToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_exitRatio","type":"uint256"},{"internalType":"uint256","name":"_exitRatioBond","type":"uint256"}],"name":"setExitRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_masterChef","type":"address"}],"name":"setMasterChef","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"},{"internalType":"bool","name":"_canMint","type":"bool"}],"name":"setMinters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardRate","type":"uint256"}],"name":"setRewardRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOperator_","type":"address"}],"name":"transferOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"totalVested","type":"uint256"},{"internalType":"uint256","name":"lastInteractionTime","type":"uint256"},{"internalType":"uint256","name":"VestPeriod","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userPositions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"vest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"vestBond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vestingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60806040526007805460ff60a01b1916600160a01b179055601e600d556096600e55624f1a0060125562c5c1006013553480156200003c57600080fd5b5060405162002703380380620027038339810160408190526200005f9162000493565b604080518082018252601881527f7853776170426c6173742046696e616e636520546f6b656e00000000000000006020808301918252835180850190945260048452633c29a12360e11b908401528151919291620000c091600391620003d4565b508051620000d6906004906020840190620003d4565b505050620000f3620000ed6200037e60201b60201c565b62000382565b6001600655600c8054336001600160a01b0319918216179091556007805482166001600160a01b0386811691909117909155600880548316858316179055600980549092169083161790556040805163784c3b3d60e11b815290517343000000000000000000000000000000000000029163f098767a91600482810192600092919082900301818387803b1580156200018b57600080fd5b505af1158015620001a0573d6000803e3d6000fd5b505050507343000000000000000000000000000000000000026001600160a01b0316634e606c476040518163ffffffff1660e01b8152600401600060405180830381600087803b158015620001f457600080fd5b505af115801562000209573d6000803e3d6000fd5b5050604051631d70c8d360e31b8152336004820152734300000000000000000000000000000000000002925063eb8646989150602401600060405180830381600087803b1580156200025a57600080fd5b505af11580156200026f573d6000803e3d6000fd5b5050604051631a33757d60e01b81527343000000000000000000000000000000000000039250631a33757d9150620002ad90600290600401620004e7565b6020604051808303816000875af1158015620002cd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f3919062000510565b50604051631a33757d60e01b815273430000000000000000000000000000000000000490631a33757d906200032e90600290600401620004e7565b6020604051808303816000875af11580156200034e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000374919062000510565b5050505062000567565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620003e2906200052a565b90600052602060002090601f01602090048101928262000406576000855562000451565b82601f106200042157805160ff191683800117855562000451565b8280016001018555821562000451579182015b828111156200045157825182559160200191906001019062000434565b506200045f92915062000463565b5090565b5b808211156200045f576000815560010162000464565b6001600160a01b03811681146200049057600080fd5b50565b600080600060608486031215620004a957600080fd5b8351620004b6816200047a565b6020850151909350620004c9816200047a565b6040850151909250620004dc816200047a565b809150509250925092565b60208101600383106200050a57634e487b7160e01b600052602160045260246000fd5b91905290565b6000602082840312156200052357600080fd5b5051919050565b600181811c908216806200053f57607f821691505b602082108114156200056157634e487b7160e01b600052602260045260246000fd5b50919050565b61218c80620005776000396000f3fe608060405234801561001057600080fd5b50600436106102815760003560e01c806370a082311161015d578063a2d9f4dc116100c9578063a2d9f4dc14610561578063a457c2d714610574578063a9059cbb14610587578063aaf5eb681461059a578063ab533a35146105a2578063ad5c4648146105ab578063c2d94aec146105b9578063d851b158146105cc578063dd62ed3e146105df578063eb68282f146105f2578063eb8738f514610600578063f2fde38b14610613578063f46eccc41461062657600080fd5b806370a08231146104a057806370b0a843146104c9578063715018a6146104dc5780637313ee5a146104e457806377d5d2dc146104ed5780637b0a47ee146104f55780637eb80ff3146104fe5780638da5cb5b1461051157806395d89b411461052257806397c545791461052a5780639be7ee4c1461053d5780639e447fc614610545578063a2add5f51461055857600080fd5b8063313387d8116101fc578063313387d8146103a4578063313ce567146103b757806331a0edec146103c6578063379607f5146103d457806339509351146103e75780633fc8cef3146103fa57806340c10f191461040d57806342966c681461042057806345420ff71461043357806349bd5a5e14610447578063575a86b21461045a578063613cf4201461046d5780636a760b801461048d57600080fd5b8063051e0a6e14610286578063060d21ba146102a257806306fdde03146102b5578063095ea7b3146102ca57806310bf74e8146102ed578063146880fe1461030257806318160ddd146103225780631869ebda1461032a57806321ce919d1461033d57806323b872dd1461036b57806323d2a2011461037e57806329605e7714610391575b600080fd5b61028f60135481565b6040519081526020015b60405180910390f35b61028f6102b0366004611d0e565b610649565b6102bd61072b565b6040516102999190611d3a565b6102dd6102d8366004611d0e565b6107bd565b6040519015158152602001610299565b6103006102fb366004611d9d565b6107d5565b005b600954610315906001600160a01b031681565b6040516102999190611dd6565b60025461028f565b610300610338366004611d0e565b61086b565b61035061034b366004611d0e565b6108e9565b60408051938452602084019290925290820152606001610299565b6102dd610379366004611dea565b61092b565b61030061038c366004611e2b565b61094f565b61030061039f366004611e4d565b610a85565b6103006103b2366004611e7e565b610a99565b60405160128152602001610299565b6103156003604360981b0181565b6103006103e2366004611eb1565b610b39565b6102dd6103f5366004611d0e565b610c30565b600854610315906001600160a01b031681565b6102dd61041b366004611d0e565b610c52565b61030061042e366004611eb1565b610cc0565b6007546102dd90600160a01b900460ff1681565b600754610315906001600160a01b031681565b600b54610315906001600160a01b031681565b61028f61047b366004611e4d565b60116020526000908152604090205481565b61030061049b366004611eb1565b610cca565b61028f6104ae366004611e4d565b6001600160a01b031660009081526020819052604090205490565b600c54610315906001600160a01b031681565b610300610de0565b61028f60125481565b610300610df4565b61028f600a5481565b61028f61050c366004611eb1565b610e6b565b6005546001600160a01b0316610315565b6102bd610ec2565b610300610538366004611eb1565b610ed1565b61028f61100a565b610300610553366004611eb1565b61115f565b61028f600d5481565b61030061056f366004611e4d565b6111c8565b6102dd610582366004611d0e565b6111f2565b6102dd610595366004611d0e565b61126d565b61028f606481565b61028f600e5481565b6103156004604360981b0181565b6103006105c7366004611e4d565b61127b565b6103006105da366004611d0e565b6112f6565b61028f6105ed366004611eca565b61139a565b6103156002604360981b0181565b61030061060e366004611e2b565b6113c5565b610300610621366004611e4d565b6115ce565b6102dd610634366004611e4d565b600f6020526000908152604090205460ff1681565b6001600160a01b03821660009081526010602052604081208054829161069a918590811061067957610679611ef8565b9060005260206000209060030201600101544261164490919063ffffffff16565b33600090815260106020526040812080549293509091859081106106c0576106c0611ef8565b90600052602060002090600302016002015482106106e057506000610723565b33600090815260106020526040902080548391908690811061070457610704611ef8565b9060005260206000209060030201600201546107209190611f24565b90505b949350505050565b60606003805461073a90611f3b565b80601f016020809104026020016040519081016040528092919081815260200182805461076690611f3b565b80156107b35780601f10610788576101008083540402835291602001916107b3565b820191906000526020600020905b81548152906001019060200180831161079657829003601f168201915b5050505050905090565b6000336107cb818585611650565b5060019392505050565b600c546001600160a01b031633146108405760405162461bcd60e51b8152602060048201526024808201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260448201526330ba37b960e11b60648201526084015b60405180910390fd5b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b610873611774565b604051637cb8cb3160e11b81526002604360981b019063f9719662906108a190309086908690600401611f76565b6020604051808303816000875af11580156108c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e49190611f9a565b505050565b6010602052816000526040600020818154811061090557600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b6000336109398582856117ce565b610944858585611848565b506001949350505050565b610957611774565b605f82111561099f5760405162461bcd60e51b8152602060048201526014602482015273043616e74206265206d6f7265207468616e2038360641b6044820152606401610837565b60058210156109e75760405162461bcd60e51b8152602060048201526014602482015273043616e74206265206c657373207468616e2032360641b6044820152606401610837565b6101f4811115610a315760405162461bcd60e51b8152602060048201526015602482015274043616e74206265206d6f7265207468616e2035303605c1b6044820152606401610837565b6064811015610a7a5760405162461bcd60e51b8152602060048201526015602482015274043616e74206265206c657373207468616e2031303605c1b6044820152606401610837565b600d91909155600e55565b610a8d611774565b610a96816119da565b50565b610aa1611774565b604051631a33757d60e01b81526003604360981b0190631a33757d90610acb908490600401611fb3565b6020604051808303816000875af1158015610aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0e9190611f9a565b50604051631a33757d60e01b81526004604360981b0190631a33757d906108a1908590600401611fb3565b610b41611a68565b610b4b3382610649565b15610b8a5760405162461bcd60e51b815260206004820152600f60248201526e1d995cdd1a5b99c81b9bdd08195b99608a1b6044820152606401610837565b336000908152601060205260408120805483908110610bab57610bab611ef8565b6000918252602082206003909102018054918155600b546040516335106f4960e11b81529193506001600160a01b031690636a20de9290610bf29033908590600401611fdb565b600060405180830381600087803b158015610c0c57600080fd5b505af1158015610c20573d6000803e3d6000fd5b505050505050610a966001600655565b6000336107cb818585610c43838361139a565b610c4d9190611ff4565b611650565b336000908152600f602052604081205460ff161515600114610cad5760405162461bcd60e51b815260206004820152601460248201527313db9b1e481b5a5b9d195c9cc8185b1b1bddd95960621b6044820152606401610837565b610cb78383611ac2565b50600192915050565b610a963382611b6f565b610cd2611a68565b6040516370a0823160e01b8152819030906370a0823190610cf7903390600401611dd6565b602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d389190611f9a565b1015610d565760405162461bcd60e51b81526004016108379061200c565b3360008181526010602090815260408083208151606081018352868152428185019081526012548285019081528354600181810186559488528688209351600390910290930192835590518284015551600290910155938352601190915281208054909190610dc6908490611ff4565b90915550610dd690503382611b6f565b610a966001600655565b610de8611774565b610df26000611c8f565b565b610dfc611774565b604051634aa7d2f760e11b81526002604360981b019063954fa5ee90610e28903090339060040161203a565b6020604051808303816000875af1158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190611f9a565b6000806064600d546064610e7f9190611f24565b610e899085612054565b610e939190612073565b9050670de0b6b3a764000081610ea761100a565b610eb19190612054565b610ebb9190612073565b9392505050565b60606004805461073a90611f3b565b610ed9611a68565b6040516370a0823160e01b8152819030906370a0823190610efe903390600401611dd6565b602060405180830381865afa158015610f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3f9190611f9a565b1015610f5d5760405162461bcd60e51b81526004016108379061200c565b60106000336001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280610fad6064610fa7600e5487611ce190919063ffffffff16565b90611ced565b81524260208083019190915260135460409283015283546001818101865560009586528286208551600390930201918255848301518282015593830151600290910155338452601190528220805491929091610dc6908490611ff4565b6000806000600760009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015611062573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108691906120ac565b506009546007546040805163d21220a760e01b815290516001600160701b0395861697509390941694506001600160a01b039182169391169163d21220a7916004808201926020929091908290030181865afa1580156110ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110e91906120fc565b6001600160a01b0316816001600160a01b0316141561114c578161113a84670de0b6b3a7640000612054565b6111449190612073565b935050505090565b8261113a83670de0b6b3a7640000612054565b600b546001600160a01b031633146111c35760405162461bcd60e51b815260206004820152602160248201527f43616c6c6572206973206e6f74204d61737465724368656620636f6e747261636044820152601d60fa1b6064820152608401610837565b600a55565b6111d0611774565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60003381611200828661139a565b9050838110156112605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610837565b6109448286868403611650565b6000336107cb818585611848565b611283611774565b60405163430021db60e11b81526002604360981b019063860043b6906112af903090859060040161203a565b6020604051808303816000875af11580156112ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f29190611f9a565b5050565b6112fe611774565b604051635569f64b60e11b81526003604360981b019063aad3ec969061132a9085908590600401611fdb565b6020604051808303816000875af1158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190611f9a565b50604051635569f64b60e11b81526004604360981b019063aad3ec96906108a19085908590600401611fdb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6113cd611a68565b600082116114295760405162461bcd60e51b815260206004820152602360248201527f785342463a20416d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b6064820152608401610837565b6000606483600d5461143b9190612054565b6114459190612073565b90506114513384611b6f565b60006064600d5460646114649190611f24565b61146e9086612054565b6114789190612073565b9050670de0b6b3a76400008161148c61100a565b6114969190612054565b6114a09190612073565b9050828111156114de5760405162461bcd60e51b8152602060048201526009602482015268536c6970706167652160b81b6044820152606401610837565b600854600c546040516323b872dd60e01b81526001600160a01b03928316926323b872dd92611517923392909116908690600401611f76565b6020604051808303816000875af1158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a9190612119565b50600b546040516335106f4960e11b81528593506001600160a01b0390911690636a20de92906115909033908690600401611fdb565b600060405180830381600087803b1580156115aa57600080fd5b505af11580156115be573d6000803e3d6000fd5b5050505050506112f26001600655565b6115d6611774565b6001600160a01b03811661163b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610837565b610a9681611c8f565b6000610ebb8284611f24565b6001600160a01b0383166116b25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610837565b6001600160a01b0382166117135760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610837565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b03163314610df25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610837565b60006117da848461139a565b9050600019811461184257818110156118355760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610837565b6118428484848403611650565b50505050565b6001600160a01b0383166118ac5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610837565b6001600160a01b03821661190e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610837565b6001600160a01b038316600090815260208190526040902054818110156119865760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610837565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020612137833981519152910160405180910390a3611842565b6001600160a01b038116611a465760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b6064820152608401610837565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60026006541415611abb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610837565b6002600655565b6001600160a01b038216611b185760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610837565b8060026000828254611b2a9190611ff4565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020612137833981519152910160405180910390a35050565b6001600160a01b038216611bcf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610837565b6001600160a01b03821660009081526020819052604090205481811015611c435760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610837565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020612137833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610ebb8284612054565b6000610ebb8284612073565b6001600160a01b0381168114610a9657600080fd5b60008060408385031215611d2157600080fd5b8235611d2c81611cf9565b946020939093013593505050565b600060208083528351808285015260005b81811015611d6757858101830151858201604001528201611d4b565b81811115611d79576000604083870101525b50601f01601f1916929092016040019392505050565b8015158114610a9657600080fd5b60008060408385031215611db057600080fd5b8235611dbb81611cf9565b91506020830135611dcb81611d8f565b809150509250929050565b6001600160a01b0391909116815260200190565b600080600060608486031215611dff57600080fd5b8335611e0a81611cf9565b92506020840135611e1a81611cf9565b929592945050506040919091013590565b60008060408385031215611e3e57600080fd5b50508035926020909101359150565b600060208284031215611e5f57600080fd5b8135610ebb81611cf9565b803560038110611e7957600080fd5b919050565b60008060408385031215611e9157600080fd5b611e9a83611e6a565b9150611ea860208401611e6a565b90509250929050565b600060208284031215611ec357600080fd5b5035919050565b60008060408385031215611edd57600080fd5b8235611ee881611cf9565b91506020830135611dcb81611cf9565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015611f3657611f36611f0e565b500390565b600181811c90821680611f4f57607f821691505b60208210811415611f7057634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215611fac57600080fd5b5051919050565b6020810160038310611fd557634e487b7160e01b600052602160045260246000fd5b91905290565b6001600160a01b03929092168252602082015260400190565b6000821982111561200757612007611f0e565b500190565b602080825260149082015273785342462062616c616e636520746f6f206c6f7760601b604082015260600190565b6001600160a01b0392831681529116602082015260400190565b600081600019048311821515161561206e5761206e611f0e565b500290565b60008261209057634e487b7160e01b600052601260045260246000fd5b500490565b80516001600160701b0381168114611e7957600080fd5b6000806000606084860312156120c157600080fd5b6120ca84612095565b92506120d860208501612095565b9150604084015163ffffffff811681146120f157600080fd5b809150509250925092565b60006020828403121561210e57600080fd5b8151610ebb81611cf9565b60006020828403121561212b57600080fd5b8151610ebb81611d8f56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212209ee849ddefae877dabe367b9682e3f5c798dc84e35dc0f844608c7105fd8541c64736f6c634300080c0033000000000000000000000000be6fb534bc0e7e9c3331f72e2759a2f88d95ef2f0000000000000000000000004300000000000000000000000000000000000004000000000000000000000000d07379a755a8f11b57610154861d694b2a0f615a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102815760003560e01c806370a082311161015d578063a2d9f4dc116100c9578063a2d9f4dc14610561578063a457c2d714610574578063a9059cbb14610587578063aaf5eb681461059a578063ab533a35146105a2578063ad5c4648146105ab578063c2d94aec146105b9578063d851b158146105cc578063dd62ed3e146105df578063eb68282f146105f2578063eb8738f514610600578063f2fde38b14610613578063f46eccc41461062657600080fd5b806370a08231146104a057806370b0a843146104c9578063715018a6146104dc5780637313ee5a146104e457806377d5d2dc146104ed5780637b0a47ee146104f55780637eb80ff3146104fe5780638da5cb5b1461051157806395d89b411461052257806397c545791461052a5780639be7ee4c1461053d5780639e447fc614610545578063a2add5f51461055857600080fd5b8063313387d8116101fc578063313387d8146103a4578063313ce567146103b757806331a0edec146103c6578063379607f5146103d457806339509351146103e75780633fc8cef3146103fa57806340c10f191461040d57806342966c681461042057806345420ff71461043357806349bd5a5e14610447578063575a86b21461045a578063613cf4201461046d5780636a760b801461048d57600080fd5b8063051e0a6e14610286578063060d21ba146102a257806306fdde03146102b5578063095ea7b3146102ca57806310bf74e8146102ed578063146880fe1461030257806318160ddd146103225780631869ebda1461032a57806321ce919d1461033d57806323b872dd1461036b57806323d2a2011461037e57806329605e7714610391575b600080fd5b61028f60135481565b6040519081526020015b60405180910390f35b61028f6102b0366004611d0e565b610649565b6102bd61072b565b6040516102999190611d3a565b6102dd6102d8366004611d0e565b6107bd565b6040519015158152602001610299565b6103006102fb366004611d9d565b6107d5565b005b600954610315906001600160a01b031681565b6040516102999190611dd6565b60025461028f565b610300610338366004611d0e565b61086b565b61035061034b366004611d0e565b6108e9565b60408051938452602084019290925290820152606001610299565b6102dd610379366004611dea565b61092b565b61030061038c366004611e2b565b61094f565b61030061039f366004611e4d565b610a85565b6103006103b2366004611e7e565b610a99565b60405160128152602001610299565b6103156003604360981b0181565b6103006103e2366004611eb1565b610b39565b6102dd6103f5366004611d0e565b610c30565b600854610315906001600160a01b031681565b6102dd61041b366004611d0e565b610c52565b61030061042e366004611eb1565b610cc0565b6007546102dd90600160a01b900460ff1681565b600754610315906001600160a01b031681565b600b54610315906001600160a01b031681565b61028f61047b366004611e4d565b60116020526000908152604090205481565b61030061049b366004611eb1565b610cca565b61028f6104ae366004611e4d565b6001600160a01b031660009081526020819052604090205490565b600c54610315906001600160a01b031681565b610300610de0565b61028f60125481565b610300610df4565b61028f600a5481565b61028f61050c366004611eb1565b610e6b565b6005546001600160a01b0316610315565b6102bd610ec2565b610300610538366004611eb1565b610ed1565b61028f61100a565b610300610553366004611eb1565b61115f565b61028f600d5481565b61030061056f366004611e4d565b6111c8565b6102dd610582366004611d0e565b6111f2565b6102dd610595366004611d0e565b61126d565b61028f606481565b61028f600e5481565b6103156004604360981b0181565b6103006105c7366004611e4d565b61127b565b6103006105da366004611d0e565b6112f6565b61028f6105ed366004611eca565b61139a565b6103156002604360981b0181565b61030061060e366004611e2b565b6113c5565b610300610621366004611e4d565b6115ce565b6102dd610634366004611e4d565b600f6020526000908152604090205460ff1681565b6001600160a01b03821660009081526010602052604081208054829161069a918590811061067957610679611ef8565b9060005260206000209060030201600101544261164490919063ffffffff16565b33600090815260106020526040812080549293509091859081106106c0576106c0611ef8565b90600052602060002090600302016002015482106106e057506000610723565b33600090815260106020526040902080548391908690811061070457610704611ef8565b9060005260206000209060030201600201546107209190611f24565b90505b949350505050565b60606003805461073a90611f3b565b80601f016020809104026020016040519081016040528092919081815260200182805461076690611f3b565b80156107b35780601f10610788576101008083540402835291602001916107b3565b820191906000526020600020905b81548152906001019060200180831161079657829003601f168201915b5050505050905090565b6000336107cb818585611650565b5060019392505050565b600c546001600160a01b031633146108405760405162461bcd60e51b8152602060048201526024808201527f6f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260448201526330ba37b960e11b60648201526084015b60405180910390fd5b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b610873611774565b604051637cb8cb3160e11b81526002604360981b019063f9719662906108a190309086908690600401611f76565b6020604051808303816000875af11580156108c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e49190611f9a565b505050565b6010602052816000526040600020818154811061090557600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b6000336109398582856117ce565b610944858585611848565b506001949350505050565b610957611774565b605f82111561099f5760405162461bcd60e51b8152602060048201526014602482015273043616e74206265206d6f7265207468616e2038360641b6044820152606401610837565b60058210156109e75760405162461bcd60e51b8152602060048201526014602482015273043616e74206265206c657373207468616e2032360641b6044820152606401610837565b6101f4811115610a315760405162461bcd60e51b8152602060048201526015602482015274043616e74206265206d6f7265207468616e2035303605c1b6044820152606401610837565b6064811015610a7a5760405162461bcd60e51b8152602060048201526015602482015274043616e74206265206c657373207468616e2031303605c1b6044820152606401610837565b600d91909155600e55565b610a8d611774565b610a96816119da565b50565b610aa1611774565b604051631a33757d60e01b81526003604360981b0190631a33757d90610acb908490600401611fb3565b6020604051808303816000875af1158015610aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0e9190611f9a565b50604051631a33757d60e01b81526004604360981b0190631a33757d906108a1908590600401611fb3565b610b41611a68565b610b4b3382610649565b15610b8a5760405162461bcd60e51b815260206004820152600f60248201526e1d995cdd1a5b99c81b9bdd08195b99608a1b6044820152606401610837565b336000908152601060205260408120805483908110610bab57610bab611ef8565b6000918252602082206003909102018054918155600b546040516335106f4960e11b81529193506001600160a01b031690636a20de9290610bf29033908590600401611fdb565b600060405180830381600087803b158015610c0c57600080fd5b505af1158015610c20573d6000803e3d6000fd5b505050505050610a966001600655565b6000336107cb818585610c43838361139a565b610c4d9190611ff4565b611650565b336000908152600f602052604081205460ff161515600114610cad5760405162461bcd60e51b815260206004820152601460248201527313db9b1e481b5a5b9d195c9cc8185b1b1bddd95960621b6044820152606401610837565b610cb78383611ac2565b50600192915050565b610a963382611b6f565b610cd2611a68565b6040516370a0823160e01b8152819030906370a0823190610cf7903390600401611dd6565b602060405180830381865afa158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d389190611f9a565b1015610d565760405162461bcd60e51b81526004016108379061200c565b3360008181526010602090815260408083208151606081018352868152428185019081526012548285019081528354600181810186559488528688209351600390910290930192835590518284015551600290910155938352601190915281208054909190610dc6908490611ff4565b90915550610dd690503382611b6f565b610a966001600655565b610de8611774565b610df26000611c8f565b565b610dfc611774565b604051634aa7d2f760e11b81526002604360981b019063954fa5ee90610e28903090339060040161203a565b6020604051808303816000875af1158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a969190611f9a565b6000806064600d546064610e7f9190611f24565b610e899085612054565b610e939190612073565b9050670de0b6b3a764000081610ea761100a565b610eb19190612054565b610ebb9190612073565b9392505050565b60606004805461073a90611f3b565b610ed9611a68565b6040516370a0823160e01b8152819030906370a0823190610efe903390600401611dd6565b602060405180830381865afa158015610f1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3f9190611f9a565b1015610f5d5760405162461bcd60e51b81526004016108379061200c565b60106000336001600160a01b03166001600160a01b031681526020019081526020016000206040518060600160405280610fad6064610fa7600e5487611ce190919063ffffffff16565b90611ced565b81524260208083019190915260135460409283015283546001818101865560009586528286208551600390930201918255848301518282015593830151600290910155338452601190528220805491929091610dc6908490611ff4565b6000806000600760009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015611062573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108691906120ac565b506009546007546040805163d21220a760e01b815290516001600160701b0395861697509390941694506001600160a01b039182169391169163d21220a7916004808201926020929091908290030181865afa1580156110ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110e91906120fc565b6001600160a01b0316816001600160a01b0316141561114c578161113a84670de0b6b3a7640000612054565b6111449190612073565b935050505090565b8261113a83670de0b6b3a7640000612054565b600b546001600160a01b031633146111c35760405162461bcd60e51b815260206004820152602160248201527f43616c6c6572206973206e6f74204d61737465724368656620636f6e747261636044820152601d60fa1b6064820152608401610837565b600a55565b6111d0611774565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60003381611200828661139a565b9050838110156112605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610837565b6109448286868403611650565b6000336107cb818585611848565b611283611774565b60405163430021db60e11b81526002604360981b019063860043b6906112af903090859060040161203a565b6020604051808303816000875af11580156112ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f29190611f9a565b5050565b6112fe611774565b604051635569f64b60e11b81526003604360981b019063aad3ec969061132a9085908590600401611fdb565b6020604051808303816000875af1158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190611f9a565b50604051635569f64b60e11b81526004604360981b019063aad3ec96906108a19085908590600401611fdb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6113cd611a68565b600082116114295760405162461bcd60e51b815260206004820152602360248201527f785342463a20416d6f756e74206d75737420626520677265617465722074686160448201526206e20360ec1b6064820152608401610837565b6000606483600d5461143b9190612054565b6114459190612073565b90506114513384611b6f565b60006064600d5460646114649190611f24565b61146e9086612054565b6114789190612073565b9050670de0b6b3a76400008161148c61100a565b6114969190612054565b6114a09190612073565b9050828111156114de5760405162461bcd60e51b8152602060048201526009602482015268536c6970706167652160b81b6044820152606401610837565b600854600c546040516323b872dd60e01b81526001600160a01b03928316926323b872dd92611517923392909116908690600401611f76565b6020604051808303816000875af1158015611536573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061155a9190612119565b50600b546040516335106f4960e11b81528593506001600160a01b0390911690636a20de92906115909033908690600401611fdb565b600060405180830381600087803b1580156115aa57600080fd5b505af11580156115be573d6000803e3d6000fd5b5050505050506112f26001600655565b6115d6611774565b6001600160a01b03811661163b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610837565b610a9681611c8f565b6000610ebb8284611f24565b6001600160a01b0383166116b25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610837565b6001600160a01b0382166117135760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610837565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6005546001600160a01b03163314610df25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610837565b60006117da848461139a565b9050600019811461184257818110156118355760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610837565b6118428484848403611650565b50505050565b6001600160a01b0383166118ac5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610837565b6001600160a01b03821661190e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610837565b6001600160a01b038316600090815260208190526040902054818110156119865760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610837565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020612137833981519152910160405180910390a3611842565b6001600160a01b038116611a465760405162461bcd60e51b815260206004820152602d60248201527f6f70657261746f723a207a65726f206164647265737320676976656e20666f7260448201526c103732bb9037b832b930ba37b960991b6064820152608401610837565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60026006541415611abb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610837565b6002600655565b6001600160a01b038216611b185760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610837565b8060026000828254611b2a9190611ff4565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020612137833981519152910160405180910390a35050565b6001600160a01b038216611bcf5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610837565b6001600160a01b03821660009081526020819052604090205481811015611c435760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610837565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020612137833981519152910160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610ebb8284612054565b6000610ebb8284612073565b6001600160a01b0381168114610a9657600080fd5b60008060408385031215611d2157600080fd5b8235611d2c81611cf9565b946020939093013593505050565b600060208083528351808285015260005b81811015611d6757858101830151858201604001528201611d4b565b81811115611d79576000604083870101525b50601f01601f1916929092016040019392505050565b8015158114610a9657600080fd5b60008060408385031215611db057600080fd5b8235611dbb81611cf9565b91506020830135611dcb81611d8f565b809150509250929050565b6001600160a01b0391909116815260200190565b600080600060608486031215611dff57600080fd5b8335611e0a81611cf9565b92506020840135611e1a81611cf9565b929592945050506040919091013590565b60008060408385031215611e3e57600080fd5b50508035926020909101359150565b600060208284031215611e5f57600080fd5b8135610ebb81611cf9565b803560038110611e7957600080fd5b919050565b60008060408385031215611e9157600080fd5b611e9a83611e6a565b9150611ea860208401611e6a565b90509250929050565b600060208284031215611ec357600080fd5b5035919050565b60008060408385031215611edd57600080fd5b8235611ee881611cf9565b91506020830135611dcb81611cf9565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015611f3657611f36611f0e565b500390565b600181811c90821680611f4f57607f821691505b60208210811415611f7057634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215611fac57600080fd5b5051919050565b6020810160038310611fd557634e487b7160e01b600052602160045260246000fd5b91905290565b6001600160a01b03929092168252602082015260400190565b6000821982111561200757612007611f0e565b500190565b602080825260149082015273785342462062616c616e636520746f6f206c6f7760601b604082015260600190565b6001600160a01b0392831681529116602082015260400190565b600081600019048311821515161561206e5761206e611f0e565b500290565b60008261209057634e487b7160e01b600052601260045260246000fd5b500490565b80516001600160701b0381168114611e7957600080fd5b6000806000606084860312156120c157600080fd5b6120ca84612095565b92506120d860208501612095565b9150604084015163ffffffff811681146120f157600080fd5b809150509250925092565b60006020828403121561210e57600080fd5b8151610ebb81611cf9565b60006020828403121561212b57600080fd5b8151610ebb81611d8f56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212209ee849ddefae877dabe367b9682e3f5c798dc84e35dc0f844608c7105fd8541c64736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000be6fb534bc0e7e9c3331f72e2759a2f88d95ef2f0000000000000000000000004300000000000000000000000000000000000004000000000000000000000000d07379a755a8f11b57610154861d694b2a0f615a
-----Decoded View---------------
Arg [0] : _uniswapV2Pair (address): 0xBe6FB534bc0e7E9C3331f72E2759a2F88D95eF2F
Arg [1] : _weth (address): 0x4300000000000000000000000000000000000004
Arg [2] : _sbfToken (address): 0xd07379a755A8f11B57610154861D694b2A0f615a
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000be6fb534bc0e7e9c3331f72e2759a2f88d95ef2f
Arg [1] : 0000000000000000000000004300000000000000000000000000000000000004
Arg [2] : 000000000000000000000000d07379a755a8f11b57610154861d694b2a0f615a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.