Source Code
Latest 7 from a total of 7 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Exchange | 14230406 | 1473 days ago | IN | 0.001 ETH | 0.02896711 | ||||
| Revoke Role | 14230305 | 1473 days ago | IN | 0 ETH | 0.00188454 | ||||
| Grant Role | 14230294 | 1473 days ago | IN | 0 ETH | 0.00359458 | ||||
| Create Approval | 14230149 | 1473 days ago | IN | 0 ETH | 0.01717556 | ||||
| Create Lp Token | 14230146 | 1473 days ago | IN | 0 ETH | 0.01961105 | ||||
| Register Adapter... | 14230145 | 1473 days ago | IN | 0 ETH | 0.00714836 | ||||
| Create Internal ... | 14230142 | 1473 days ago | IN | 0 ETH | 0.24056693 |
Latest 23 internal transactions
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Deposit | 17288749 | 1019 days ago | 4.99919682 ETH | ||||
| Transfer | 17288749 | 1019 days ago | 4.99919682 ETH | ||||
| Deposit | 17286745 | 1019 days ago | 5.089911 ETH | ||||
| Transfer | 17286745 | 1019 days ago | 5.089911 ETH | ||||
| Deposit | 17285405 | 1019 days ago | 43.471694 ETH | ||||
| Transfer | 17285405 | 1019 days ago | 43.471694 ETH | ||||
| Add_liquidity | 16725712 | 1098 days ago | 5 ETH | ||||
| Transfer | 16725712 | 1098 days ago | 5 ETH | ||||
| Add_liquidity | 16694282 | 1103 days ago | 10 ETH | ||||
| Transfer | 16694282 | 1103 days ago | 10 ETH | ||||
| Add_liquidity | 16598454 | 1116 days ago | 0.00486867 ETH | ||||
| Transfer | 16598454 | 1116 days ago | 0.00486867 ETH | ||||
| Add_liquidity | 16579810 | 1119 days ago | 5 ETH | ||||
| Transfer | 16579810 | 1119 days ago | 5 ETH | ||||
| Add_liquidity | 16579664 | 1119 days ago | 5 ETH | ||||
| Transfer | 16579664 | 1119 days ago | 5 ETH | ||||
| Add_liquidity | 16578839 | 1119 days ago | 15 ETH | ||||
| Transfer | 16578839 | 1119 days ago | 15 ETH | ||||
| Add_liquidity | 15953519 | 1206 days ago | 17.8654885 ETH | ||||
| Transfer | 15953519 | 1206 days ago | 17.8654885 ETH | ||||
| Add_liquidity | 15796940 | 1228 days ago | 5 ETH | ||||
| Transfer | 15796940 | 1228 days ago | 5 ETH | ||||
| - | 14230406 | 1473 days ago | 0.001 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Exchange
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./interfaces/IWrappedEther.sol";
import "./interfaces/IExchangeAdapter.sol";
contract Exchange is ReentrancyGuard, AccessControl {
using SafeERC20 for IERC20;
using Address for address;
// struct size - 64 bytes, 2 slots
struct RouteEdge {
uint32 swapProtocol; // 0 - unknown edge, 1 - UniswapV2, 2 - Curve...
address pool; // address of pool to call
address fromCoin; // address of coin to deposit to pool
address toCoin; // address of coin to get from pool
}
// struct size - 32 bytes, 1 slots
struct LpToken {
uint32 swapProtocol; // 0 - unknown edge, 1 - UniswapV2, 2 - Curve...
address pool; // address of pool to call
}
// returns true if address is registered as major token, false otherwise
mapping(address => bool) public isMajorCoin;
// returns true if pool received approve of token. First address is pool,
// second is token
mapping(address => mapping(address => bool)) public approveCompleted;
// Storage of routes between major coins. Normally, any major coin should
// have route to any other major coin that is saved here
mapping(address => mapping(address => RouteEdge[]))
private internalMajorRoute;
// Storage of single edges from minor coin to major
mapping(address => RouteEdge) public minorCoins;
// Storage of LP tokens that are registeres in exchange
mapping(address => LpToken) public lpTokens;
// Storage of swap execution method for different protocols
mapping(uint32 => address) public adapters;
// Wrapped ether token that is used for native ether swaps
IWrappedEther public wrappedEther =
IWrappedEther(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
// bytes4(keccak256(bytes("executeSwap(address,address,address,uint256)")))
bytes4 public constant executeSwapSigHash = 0x6012856e;
// bytes4(keccak256(bytes("enterPool(address,address,uint256)")))
bytes4 public constant enterPoolSigHash = 0x73ec962e;
// bytes4(keccak256(bytes("exitPool(address,address,uint256)")))
bytes4 public constant exitPoolSigHash = 0x660cb8d4;
constructor(address gnosis, bool isTesting) {
require(gnosis.isContract(), "Exchange: not contract");
_grantRole(DEFAULT_ADMIN_ROLE, gnosis);
if (isTesting) _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
}
/// @notice Execute exchange of coins through predefined routes
/// @param from swap input token
/// @param to swap output token
/// @param amountIn amount of `from `tokens to be taken from caller
/// @param minAmountOut minimum amount of output tokens, revert if less
/// @return Amount of tokens that are returned
function exchange(
address from,
address to,
uint256 amountIn,
uint256 minAmountOut
) external payable nonReentrant returns (uint256) {
require(from != to, "Exchange: from == to");
if (lpTokens[to].swapProtocol != 0) {
IERC20(from).safeTransferFrom(msg.sender, address(this), amountIn);
uint256 amountOut = _enterLiquidityPool(from, to, amountIn);
require(amountOut >= minAmountOut, "Exchange: slippage");
IERC20(to).safeTransfer(msg.sender, amountOut);
return amountOut;
}
if (lpTokens[from].swapProtocol != 0) {
IERC20(from).safeTransferFrom(msg.sender, address(this), amountIn);
uint256 amountOut = _exitLiquidityPool(from, to, amountIn);
require(amountOut >= minAmountOut, "Exchange: slippage");
IERC20(to).safeTransfer(msg.sender, amountOut);
return amountOut;
}
if (
from == address(0) ||
from == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
) {
require(
to != address(0) &&
to != 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE,
"Exchange: ETH to ETH"
);
require(amountIn == msg.value, "Exchange: value/amount discrep");
wrappedEther.deposit{value: msg.value}();
uint256 amountOut = _exchange(address(wrappedEther), to, amountIn);
require(amountOut >= minAmountOut, "Exchange: slippage");
IERC20(to).safeTransfer(msg.sender, amountOut);
return amountOut;
}
IERC20(from).safeTransferFrom(msg.sender, address(this), amountIn);
if (
to == address(0) || to == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
) {
uint256 amountOut = _exchange(
from,
address(wrappedEther),
amountIn
);
require(amountOut >= minAmountOut, "Exchange: slippage");
wrappedEther.withdraw(amountOut);
Address.sendValue(payable(msg.sender), amountOut);
return amountOut;
}
uint256 amountOut_ = _exchange(from, to, amountIn);
require(amountOut_ >= minAmountOut, "Exchange: slippage");
IERC20(to).safeTransfer(msg.sender, amountOut_);
return amountOut_;
}
/// @notice Register swap/lp token adapters
/// @param protocolId protocol id of adapter to add
function registerAdapters(
address[] calldata adapters_,
uint32[] calldata protocolId
) external onlyRole(DEFAULT_ADMIN_ROLE) {
uint256 length = adapters_.length;
require(
adapters_.length == protocolId.length,
"Exchange: length discrep"
);
for (uint256 i = 0; i < length; i++) {
adapters[protocolId[i]] = adapters_[i];
}
}
/// @notice Unregister swap/lp token adapters
/// @param protocolId protocol id of adapter to remove
function unregisterAdapters(uint32[] calldata protocolId)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
uint256 length = protocolId.length;
for (uint256 i = 0; i < length; i++) {
delete adapters[protocolId[i]];
}
}
/// @notice Create single edge of a route from minor coin to major
/// @dev In order for swap from/to minor coin to be working, `toCoin` should
/// be registered as major
/// @param edges array of edges to store
function createMinorCoinEdge(RouteEdge[] calldata edges)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
uint256 length = edges.length;
for (uint256 i = 0; i < length; i++) {
// validate protocol id - zero is interpreted as
// non-existing route
require(edges[i].swapProtocol != 0, "Exchange: protocol type !set");
require(
edges[i].fromCoin != edges[i].toCoin,
"Exchange: edge is loop"
);
if (!approveCompleted[edges[i].pool][edges[i].fromCoin]) {
IERC20(edges[i].fromCoin).safeApprove(
edges[i].pool,
type(uint256).max
);
approveCompleted[edges[i].pool][edges[i].fromCoin] = true;
}
if (!approveCompleted[edges[i].pool][edges[i].toCoin]) {
IERC20(edges[i].toCoin).safeApprove(
edges[i].pool,
type(uint256).max
);
approveCompleted[edges[i].pool][edges[i].toCoin] = true;
}
minorCoins[edges[i].fromCoin] = edges[i];
}
}
/// @notice Remove internal minor route piece
/// @param edges source coin of route to delete
function deleteMinorCoinEdge(address[] calldata edges)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
for (uint256 i = 0; i < edges.length; i++) {
delete minorCoins[edges[i]];
}
}
/// @notice Create route between two tokens and set them as major
/// @param routes array of routes
function createInternalMajorRoutes(RouteEdge[][] calldata routes)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
for (uint256 i = 0; i < routes.length; i++) {
RouteEdge[] memory route = routes[i];
// extract start and beginning of given route
address start = route[0].fromCoin;
address end = route[route.length - 1].toCoin;
require(start != end, "Exchange: route is loop");
if (internalMajorRoute[start][end].length != 0) {
delete internalMajorRoute[start][end];
}
// validate protocol id - zero is interpreted as non-existing route
require(route[0].swapProtocol != 0, "Exchange: protocol type !set");
// set approve of the token to the pool
if (!approveCompleted[route[0].pool][route[0].fromCoin]) {
IERC20(route[0].fromCoin).safeApprove(
route[0].pool,
type(uint256).max
);
approveCompleted[route[0].pool][route[0].fromCoin] = true;
}
require(
route[0].fromCoin != route[0].toCoin,
"Exchange: edge is loop"
);
// starting to save this route
internalMajorRoute[start][end].push(route[0]);
// if route is simple, then we've done everything for it
if (route.length == 1) {
// as route between these coins is set, we consider them as major
isMajorCoin[start] = true;
isMajorCoin[end] = true;
continue;
}
// loop through whole route to check its continuity
address node = route[0].toCoin;
for (uint256 j = 1; j < route.length; j++) {
require(route[j].fromCoin == node, "Exchange: route broken");
node = route[j].toCoin;
// validate protocol id - zero is interpreted as
// non-existing route
require(
route[j].swapProtocol != 0,
"Exchange: protocol type !set"
);
require(
route[j].fromCoin != route[j].toCoin,
"Exchange: edge is loop"
);
// set approve of the token to the pool
if (!approveCompleted[route[j].pool][route[j].fromCoin]) {
IERC20(route[j].fromCoin).safeApprove(
route[j].pool,
type(uint256).max
);
approveCompleted[route[j].pool][route[j].fromCoin] = true;
}
// continiuing to save this route
internalMajorRoute[start][end].push(route[j]);
}
// as route between these coins is set, we consider them as major
isMajorCoin[start] = true;
isMajorCoin[end] = true;
}
}
/// @notice Remove internal major routes and unregister them on demand
/// @param from source coin of route to delete
/// @param to destination coin of route to delete
/// @param removeMajor true if need to no longer recognize source and destination coin as major
function deleteInternalMajorRoutes(
address[] calldata from,
address[] calldata to,
bool removeMajor
) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(from.length == to.length, "Exchange: length discrep");
for (uint256 i = 0; i < from.length; i++) {
delete internalMajorRoute[from[i]][to[i]];
if (removeMajor) {
isMajorCoin[from[i]] = false;
isMajorCoin[to[i]] = false;
}
}
}
/// @notice Force unapprove of some coin to any pool
/// @param coins coins list
/// @param spenders pools list
function removeApproval(
address[] calldata coins,
address[] calldata spenders
) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(coins.length == spenders.length, "Exchange: length discrep");
for (uint256 i = 0; i < coins.length; i++) {
IERC20(coins[i]).safeApprove(spenders[i], 0);
approveCompleted[spenders[i]][coins[i]] = false;
}
}
/// @notice Force approve of some coin to any pool
/// @param coins coins list
/// @param spenders pools list
function createApproval(
address[] calldata coins,
address[] calldata spenders
) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(coins.length == spenders.length, "Exchange: length discrep");
for (uint256 i = 0; i < coins.length; i++) {
IERC20(coins[i]).safeApprove(spenders[i], type(uint256).max);
approveCompleted[spenders[i]][coins[i]] = true;
}
}
/// @notice Add all info for enabling LP token swap and set up coin approval
/// @param edges info about protocol type and pools
/// @param lpTokensAddress coins that will be recognized as LP tokens
/// @param entryCoins coins which require approval to pool
function createLpToken(
LpToken[] calldata edges,
address[] calldata lpTokensAddress,
address[][] calldata entryCoins
) external onlyRole(DEFAULT_ADMIN_ROLE) {
require(
edges.length == entryCoins.length &&
entryCoins.length == lpTokensAddress.length,
"Exchange: length discrep"
);
for (uint256 i = 0; i < edges.length; i++) {
LpToken memory edge = edges[i];
require(edge.swapProtocol != 0, "Exchange: protocol type !set");
for (uint256 j = 0; j < entryCoins[i].length; j++) {
if (!approveCompleted[edge.pool][entryCoins[i][j]]) {
IERC20(entryCoins[i][j]).safeApprove(
edge.pool,
type(uint256).max
);
approveCompleted[edge.pool][entryCoins[i][j]] = true;
}
}
lpTokens[lpTokensAddress[i]] = edge;
}
}
/// @notice Set addresses to be no longer recognized as LP tokens
/// @param edges list of LP tokens
function deleteLpToken(address[] calldata edges)
external
onlyRole(DEFAULT_ADMIN_ROLE)
{
for (uint256 i = 0; i < edges.length; i++) {
delete lpTokens[edges[i]];
}
}
/// @inheritdoc AccessControl
function grantRole(bytes32 role, address account)
public
override
onlyRole(getRoleAdmin(role))
{
require(account.isContract(), "Exchange: not contract");
_grantRole(role, account);
}
/// @notice Build highest liquidity swap route between two ERC20 coins
/// @param from address of coin to start route from
/// @param to address of route destination coin
/// @return route containing liquidity pool addresses
function buildRoute(address from, address to)
public
view
returns (RouteEdge[] memory)
{
bool isFromMajorCoin = isMajorCoin[from];
bool isToMajorCoin = isMajorCoin[to];
if (isFromMajorCoin && isToMajorCoin) {
// Moscow - Heathrow
// in this case route of major coins is predefined
RouteEdge[] memory majorToMajor = internalMajorRoute[from][to];
// check if this part of route exists
require(
majorToMajor.length > 0,
"Exchange: 1!path from major coin"
);
return majorToMajor;
} else if (!isFromMajorCoin && isToMajorCoin) {
// Tomsk - Heathrow
// getting predefined route from minor coin to major coin
RouteEdge memory minorToMajor = minorCoins[from];
// revert if route is not predefined
require(
minorToMajor.swapProtocol != 0,
"Exchange: 2!path from input coin"
);
// if predefined route from minor to major coin is what we wanted
// to get, simply return it
if (minorToMajor.toCoin == to) {
RouteEdge[] memory result = new RouteEdge[](1);
result[0] = minorToMajor;
return result;
}
// find continuation of the route, if these major coins don't match
RouteEdge[] memory majorToMajor = internalMajorRoute[
minorToMajor.toCoin
][to];
// check if this part of route exists
require(
majorToMajor.length > 0,
"Exchange: 2!path from major coin"
);
// concatenate route and return it
RouteEdge[] memory route = new RouteEdge[](majorToMajor.length + 1);
route[0] = minorToMajor;
for (uint256 i = 0; i < majorToMajor.length; i++) {
route[i + 1] = majorToMajor[i];
}
return route;
} else if (isFromMajorCoin && !isToMajorCoin) {
// Heathrow - Sochi
// getting predefined route from any major coin to target minor coin
RouteEdge memory majorToMinor = reverseRouteEdge(minorCoins[to]);
// revert if route is not predefined
require(
majorToMinor.swapProtocol != 0,
"Exchange: 3!path from input coin"
);
// if predefined route from major to minor coin is what we wanted
// to get, simply return it
if (majorToMinor.fromCoin == from) {
RouteEdge[] memory result = new RouteEdge[](1);
result[0] = majorToMinor;
return result;
}
// find beginning of route from start major coin to major coin
// that is linked to destination
RouteEdge[] memory majorToMajor = internalMajorRoute[from][
majorToMinor.fromCoin
];
// check if this part of route exists
require(
majorToMajor.length > 0,
"Exchange: 3!path from major coin"
);
// concatenate route and return it
RouteEdge[] memory route = new RouteEdge[](majorToMajor.length + 1);
route[majorToMajor.length] = majorToMinor;
for (uint256 i = 0; i < majorToMajor.length; i++) {
route[i] = majorToMajor[i];
}
return route;
} else {
// Chelyabinsk - Glasgow
// minor - minor
// get paths from source and target coin to
// corresponding major coins
RouteEdge memory minorToMajor = minorCoins[from];
RouteEdge memory majorToMinor = reverseRouteEdge(minorCoins[to]);
// revert if routes are not predefined
require(
minorToMajor.swapProtocol != 0,
"Exchange: 4!path from input coin"
);
require(
majorToMinor.swapProtocol != 0,
"Exchange: 4!path from out coin"
);
// if these paths overlap on one coin, simply return it
if (minorToMajor.toCoin == majorToMinor.fromCoin) {
RouteEdge[] memory result = new RouteEdge[](2);
result[0] = minorToMajor;
result[1] = majorToMinor;
return result;
}
// connect input and output coins with major coins
RouteEdge[] memory majorToMajor = internalMajorRoute[
minorToMajor.toCoin
][majorToMinor.fromCoin];
// check if this part of route exists
require(
majorToMajor.length > 0,
"Exchange: 4!path from major coin"
);
// concatenate route and return it
RouteEdge[] memory route = new RouteEdge[](majorToMajor.length + 2);
route[0] = minorToMajor;
route[majorToMajor.length + 1] = majorToMinor;
for (uint256 i = 0; i < majorToMajor.length; i++) {
route[i + 1] = majorToMajor[i];
}
return route;
}
}
/// @notice Get prebuilt route between two major coins
/// @param from major coin to start route from
/// @param to major coin that should be end of route
/// @return Prebuilt route between major coins
function getMajorRoute(address from, address to)
external
view
returns (RouteEdge[] memory)
{
return internalMajorRoute[from][to];
}
function _exchange(
address from,
address to,
uint256 amountIn
) private returns (uint256) {
// this code was written at late evening of 14 Feb
// i would like to say to solidity: i love you <3
// you're naughty bitch, but anyway
RouteEdge[] memory edges = buildRoute(from, to);
uint256 swapAmount = amountIn;
for (uint256 i = 0; i < edges.length; i++) {
RouteEdge memory edge = edges[i];
address adapter = adapters[edge.swapProtocol];
require(adapter != address(0), "Exchange: adapter not found");
// using delegatecall for gas savings (no need to transfer tokens
// to/from adapter)
bytes memory returnedData = adapter.functionDelegateCall(
abi.encodeWithSelector(
executeSwapSigHash,
edge.pool,
edge.fromCoin,
edge.toCoin,
swapAmount
)
);
// extract return value from delegatecall
swapAmount = abi.decode(returnedData, (uint256));
}
return swapAmount;
}
function _enterLiquidityPool(
address from,
address to,
uint256 amountIn
) private returns (uint256) {
LpToken memory edge = lpTokens[to];
address adapter = adapters[edge.swapProtocol];
require(adapter != address(0), "Exchange: adapter not found");
// using delegatecall for gas savings (no need to transfer tokens
// to adapter)
bytes memory returnedData = adapter.functionDelegateCall(
abi.encodeWithSelector(enterPoolSigHash, edge.pool, from, amountIn)
);
// extract return value from delegatecall
return abi.decode(returnedData, (uint256));
}
function _exitLiquidityPool(
address from,
address to,
uint256 amountIn
) private returns (uint256) {
LpToken memory edge = lpTokens[from];
address adapter = adapters[edge.swapProtocol];
require(adapter != address(0), "Exchange: adapter not found");
// using delegatecall for gas savings (no need to transfer tokens
// to adapter)
bytes memory returnedData = adapter.functionDelegateCall(
abi.encodeWithSelector(exitPoolSigHash, edge.pool, to, amountIn)
);
// extract return value from delegatecall
return abi.decode(returnedData, (uint256));
}
function reverseRouteEdge(RouteEdge memory route)
private
pure
returns (RouteEdge memory)
{
address cache = route.fromCoin;
route.fromCoin = route.toCoin;
route.toCoin = cache;
return route;
}
receive() external payable {}
}// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.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;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
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));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
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");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @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");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)
pragma solidity ^0.8.0;
/**
* @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
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 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://diligence.consensys.net/posts/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.5.11/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 functionCall(target, data, "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");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(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) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(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) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason 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 {
// 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
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role, _msgSender());
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
interface IWrappedEther {
function name() external view returns (string memory);
function approve(address guy, uint256 wad) external returns (bool);
function totalSupply() external view returns (uint256);
function transferFrom(
address src,
address dst,
uint256 wad
) external returns (bool);
function withdraw(uint256 wad) external;
function decimals() external view returns (uint8);
function balanceOf(address) external view returns (uint256);
function symbol() external view returns (string memory);
function transfer(address dst, uint256 wad) external returns (bool);
function deposit() external payable;
function allowance(address, address) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
interface IExchangeAdapter {
// 0x6012856e => executeSwap(address,address,address,uint256)
function executeSwap(
address pool,
address fromToken,
address toToken,
uint256 amount
) external payable returns (uint256);
// 0x73ec962e => enterPool(address,address,uint256)
function enterPool(
address pool,
address fromToken,
uint256 amount
) external payable returns (uint256);
// 0x660cb8d4 => exitPool(address,address,uint256)
function exitPool(
address pool,
address toToken,
uint256 amount
) external payable returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 1000000
},
"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":"address","name":"gnosis","type":"address"},{"internalType":"bool","name":"isTesting","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"adapters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"approveCompleted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"buildRoute","outputs":[{"components":[{"internalType":"uint32","name":"swapProtocol","type":"uint32"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"fromCoin","type":"address"},{"internalType":"address","name":"toCoin","type":"address"}],"internalType":"struct Exchange.RouteEdge[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"coins","type":"address[]"},{"internalType":"address[]","name":"spenders","type":"address[]"}],"name":"createApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"swapProtocol","type":"uint32"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"fromCoin","type":"address"},{"internalType":"address","name":"toCoin","type":"address"}],"internalType":"struct Exchange.RouteEdge[][]","name":"routes","type":"tuple[][]"}],"name":"createInternalMajorRoutes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"swapProtocol","type":"uint32"},{"internalType":"address","name":"pool","type":"address"}],"internalType":"struct Exchange.LpToken[]","name":"edges","type":"tuple[]"},{"internalType":"address[]","name":"lpTokensAddress","type":"address[]"},{"internalType":"address[][]","name":"entryCoins","type":"address[][]"}],"name":"createLpToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"swapProtocol","type":"uint32"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"fromCoin","type":"address"},{"internalType":"address","name":"toCoin","type":"address"}],"internalType":"struct Exchange.RouteEdge[]","name":"edges","type":"tuple[]"}],"name":"createMinorCoinEdge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"from","type":"address[]"},{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"bool","name":"removeMajor","type":"bool"}],"name":"deleteInternalMajorRoutes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"edges","type":"address[]"}],"name":"deleteLpToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"edges","type":"address[]"}],"name":"deleteMinorCoinEdge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enterPoolSigHash","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"minAmountOut","type":"uint256"}],"name":"exchange","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"executeSwapSigHash","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exitPoolSigHash","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"getMajorRoute","outputs":[{"components":[{"internalType":"uint32","name":"swapProtocol","type":"uint32"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"fromCoin","type":"address"},{"internalType":"address","name":"toCoin","type":"address"}],"internalType":"struct Exchange.RouteEdge[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isMajorCoin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lpTokens","outputs":[{"internalType":"uint32","name":"swapProtocol","type":"uint32"},{"internalType":"address","name":"pool","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minorCoins","outputs":[{"internalType":"uint32","name":"swapProtocol","type":"uint32"},{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"fromCoin","type":"address"},{"internalType":"address","name":"toCoin","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"adapters_","type":"address[]"},{"internalType":"uint32[]","name":"protocolId","type":"uint32[]"}],"name":"registerAdapters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"coins","type":"address[]"},{"internalType":"address[]","name":"spenders","type":"address[]"}],"name":"removeApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"protocolId","type":"uint32[]"}],"name":"unregisterAdapters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedEther","outputs":[{"internalType":"contract IWrappedEther","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080604052600880546001600160a01b03191673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21790553480156200003757600080fd5b5060405162005f7538038062005f758339810160408190526200005a916200018a565b600160008190555062000081826001600160a01b0316620000fb60201b620040941760201c565b620000d25760405162461bcd60e51b815260206004820152601660248201527f45786368616e67653a206e6f7420636f6e747261637400000000000000000000604482015260640160405180910390fd5b620000df60008362000101565b8015620000f357620000f360003362000101565b5050620001d8565b3b151590565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff16620001865760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45b5050565b600080604083850312156200019e57600080fd5b82516001600160a01b0381168114620001b657600080fd5b60208401519092508015158114620001cd57600080fd5b809150509250929050565b615d8d80620001e86000396000f3fe6080604052600436106101c65760003560e01c806372455246116100f7578063b2e59de111610095578063cfa57daf11610064578063cfa57daf14610717578063d547741f14610737578063e6e9d1cf14610757578063fd3a60971461077757600080fd5b8063b2e59de114610659578063b3a2c09714610694578063c91f014d146106b4578063ca0fdae0146106f757600080fd5b8063a217fddf116100d1578063a217fddf1461056c578063a2ac31d514610581578063af695a20146105b5578063b17b658d146105d557600080fd5b8063724552461461049457806391d14854146104b4578063a0caa45e1461050757600080fd5b8063265a9ca61161016457806336568abe1161013e57806336568abe1461037d5780635bc4696e1461039d5780635f3f0710146104475780636e8811021461047457600080fd5b8063265a9ca61461030d5780632f2ff15d1461032d578063326705ab1461034d57600080fd5b806314671a29116101a057806314671a291461024a578063170e2c8b1461029c5780631e6b208e146102bc578063248a9ca3146102dc57600080fd5b806301ffc9a7146101d25780630ed2fc951461020757806312e63e111461022857600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004615282565b6107ab565b60405190151581526020015b60405180910390f35b61021a6102153660046152e6565b610844565b6040519081526020016101fe565b34801561023457600080fd5b50610248610243366004615378565b610eed565b005b34801561025657600080fd5b506008546102779073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b3480156102a857600080fd5b506102486102b73660046153ba565b610f93565b3480156102c857600080fd5b506102486102d7366004615378565b61119f565b3480156102e857600080fd5b5061021a6102f7366004615426565b6000908152600160208190526040909120015490565b34801561031957600080fd5b506102486103283660046153ba565b611237565b34801561033957600080fd5b5061024861034836600461543f565b61137e565b34801561035957600080fd5b506101f261036836600461546f565b60026020526000908152604090205460ff1681565b34801561038957600080fd5b5061024861039836600461543f565b611428565b3480156103a957600080fd5b506104046103b836600461546f565b60056020526000908152604090208054600182015460029092015463ffffffff82169273ffffffffffffffffffffffffffffffffffffffff640100000000909304831692908116911684565b6040805163ffffffff909516855273ffffffffffffffffffffffffffffffffffffffff9384166020860152918316918401919091521660608201526080016101fe565b34801561045357600080fd5b5061046761046236600461548c565b6114db565b6040516101fe91906154ba565b34801561048057600080fd5b5061046761048f36600461548c565b6115b3565b3480156104a057600080fd5b506102486104af36600461554d565b61246f565b3480156104c057600080fd5b506101f26104cf36600461543f565b600091825260016020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b34801561051357600080fd5b5061053b7f73ec962e0000000000000000000000000000000000000000000000000000000081565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101fe565b34801561057857600080fd5b5061021a600081565b34801561058d57600080fd5b5061053b7f660cb8d40000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b506102486105d03660046155d1565b6126dc565b3480156105e157600080fd5b506106286105f036600461546f565b60066020526000908152604090205463ffffffff811690640100000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805163ffffffff909316835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101fe565b34801561066557600080fd5b506101f261067436600461548c565b600360209081526000928352604080842090915290825290205460ff1681565b3480156106a057600080fd5b506102486106af3660046153ba565b612d43565b3480156106c057600080fd5b506102776106cf366004615658565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561070357600080fd5b50610248610712366004615378565b612ef6565b34801561072357600080fd5b50610248610732366004615675565b613ba5565b34801561074357600080fd5b5061024861075236600461543f565b613f94565b34801561076357600080fd5b50610248610772366004615378565b613fbb565b34801561078357600080fd5b5061053b7f6012856e0000000000000000000000000000000000000000000000000000000081565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061083e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000600260005414156108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff8581169085161415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2066726f6d203d3d20746f00000000000000000000000060448201526064016108af565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006602052604090205463ffffffff1615610a345761099373ffffffffffffffffffffffffffffffffffffffff861633308661409a565b60006109a0868686614176565b905082811015610a0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45786368616e67653a20736c697070616765000000000000000000000000000060448201526064016108af565b610a2d73ffffffffffffffffffffffffffffffffffffffff86163383614355565b9050610ee0565b73ffffffffffffffffffffffffffffffffffffffff851660009081526006602052604090205463ffffffff1615610a9457610a8773ffffffffffffffffffffffffffffffffffffffff861633308661409a565b60006109a08686866143ab565b73ffffffffffffffffffffffffffffffffffffffff85161580610ae0575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff8616145b15610cae5773ffffffffffffffffffffffffffffffffffffffff841615801590610b34575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff851614155b610b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2045544820746f2045544800000000000000000000000060448201526064016108af565b348314610c03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f45786368616e67653a2076616c75652f616d6f756e742064697363726570000060448201526064016108af565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c6d57600080fd5b505af1158015610c81573d6000803e3d6000fd5b5050600854600093506109a0925073ffffffffffffffffffffffffffffffffffffffff16905086866144d1565b610cd073ffffffffffffffffffffffffffffffffffffffff861633308661409a565b73ffffffffffffffffffffffffffffffffffffffff84161580610d1c575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff8516145b15610e4357600854600090610d4990879073ffffffffffffffffffffffffffffffffffffffff16866144d1565b905082811015610db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45786368616e67653a20736c697070616765000000000000000000000000000060448201526064016108af565b6008546040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90602401600060405180830381600087803b158015610e2157600080fd5b505af1158015610e35573d6000803e3d6000fd5b50505050610a2d3382614653565b6000610e508686866144d1565b905082811015610ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45786368616e67653a20736c697070616765000000000000000000000000000060448201526064016108af565b610edd73ffffffffffffffffffffffffffffffffffffffff86163383614355565b90505b6001600055949350505050565b6000610ef981336147ad565b60005b82811015610f8d5760066000858584818110610f1a57610f1a61573d565b9050602002016020810190610f2f919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffff00000000000000000000000000000000000000000000000016905580610f858161579b565b915050610efc565b50505050565b6000610f9f81336147ad565b838214611008576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b84811015611197576110a28484838181106110285761102861573d565b905060200201602081019061103d919061546f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8888858181106110705761107061573d565b9050602002016020810190611085919061546f565b73ffffffffffffffffffffffffffffffffffffffff16919061487f565b6001600360008686858181106110ba576110ba61573d565b90506020020160208101906110cf919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088888581811061111d5761111d61573d565b9050602002016020810190611132919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061118f8161579b565b91505061100b565b505050505050565b60006111ab81336147ad565b8160005b8181101561123057600760008686848181106111cd576111cd61573d565b90506020020160208101906111e29190615658565b63ffffffff168152602081019190915260400160002080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055806112288161579b565b9150506111af565b5050505050565b600061124381336147ad565b838281146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b81811015611375578686828181106112ca576112ca61573d565b90506020020160208101906112df919061546f565b600760008787858181106112f5576112f561573d565b905060200201602081019061130a9190615658565b63ffffffff168152602081019190915260400160002080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790558061136d8161579b565b9150506112b0565b50505050505050565b6000828152600160208190526040909120015461139b81336147ad565b73ffffffffffffffffffffffffffffffffffffffff82163b611419576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a206e6f7420636f6e74726163740000000000000000000060448201526064016108af565b6114238383614a01565b505050565b73ffffffffffffffffffffffffffffffffffffffff811633146114cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108af565b6114d78282614ac0565b5050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526004602090815260408083209385168352928152828220805484518184028101840190955280855260609493919290919084015b828210156115a75760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff640100000000909104811684860152600180830154821693850193909352600290910154166060830152908352909201910161152c565b50505050905092915050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526002602052604080822054928416825290205460609160ff90811691168180156115f75750805b156117415773ffffffffffffffffffffffffffffffffffffffff8086166000908152600460209081526040808320938816835292815282822080548451818402810184019095528085529293929091849084015b828210156116c65760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff640100000000909104811684860152600180830154821693850193909352600290910154166060830152908352909201910161164b565b5050505090506000815111611737576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203121706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b925061083e915050565b8115801561174c5750805b15611b595773ffffffffffffffffffffffffffffffffffffffff8086166000908152600560209081526040918290208251608081018452815463ffffffff8116808352640100000000909104861693820193909352600182015485169381019390935260020154909216606082015290611822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203221706174682066726f6d20696e70757420636f696e60448201526064016108af565b8473ffffffffffffffffffffffffffffffffffffffff16816060015173ffffffffffffffffffffffffffffffffffffffff1614156118f057604080516001808252818301909252600091816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161187157905050905081816000815181106118d9576118d961573d565b60200260200101819052508094505050505061083e565b606081015173ffffffffffffffffffffffffffffffffffffffff9081166000908152600460209081526040808320938916835292815282822080548451818402810184019095528085529293929091849084015b828210156119bf5760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff6401000000009091048116848601526001808301548216938501939093526002909101541660608301529083529092019101611944565b5050505090506000815111611a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203221706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b600081516001611a409190615803565b67ffffffffffffffff811115611a5857611a586157d4565b604051908082528060200260200182016040528015611ac857816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181611a765790505b5090508281600081518110611adf57611adf61573d565b602002602001018190525060005b8251811015611b4c57828181518110611b0857611b0861573d565b602002602001015182826001611b1e9190615803565b81518110611b2e57611b2e61573d565b60200260200101819052508080611b449061579b565b915050611aed565b50945061083e9350505050565b818015611b64575080155b15611f355773ffffffffffffffffffffffffffffffffffffffff8481166000908152600560209081526040808320815160808082018452825463ffffffff80821684526401000000009091048816838701526001840154881683860190815260029094015488166060808501918252865193840187528884529683018890529482018790529401949094528051825186169091529093169092528051909116611c69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203321706174682066726f6d20696e70757420636f696e60448201526064016108af565b8573ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff161415611ce657604080516001815260c0810182526000918101828152606082018390526080820183905260a0820183905260208201528051909183918391906118d9576118d961573d565b73ffffffffffffffffffffffffffffffffffffffff808716600090815260046020908152604080832085820151909416835292815282822080548451818402810184019095528085529293929091849084015b82821015611db45760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff6401000000009091048116848601526001808301548216938501939093526002909101541660608301529083529092019101611d39565b5050505090506000815111611e25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203321706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b600081516001611e359190615803565b67ffffffffffffffff811115611e4d57611e4d6157d4565b604051908082528060200260200182016040528015611ebd57816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181611e6b5790505b5090508281835181518110611ed457611ed461573d565b602002602001018190525060005b8251811015611b4c57828181518110611efd57611efd61573d565b6020026020010151828281518110611f1757611f1761573d565b60200260200101819052508080611f2d9061579b565b915050611ee2565b73ffffffffffffffffffffffffffffffffffffffff8581166000908152600560208181526040808420815160808082018452825463ffffffff8082168452640100000000918290048a16848801526001808601548b16858801526002958601548b166060808701919091528f8c168b52988852868a208751808601895281549384168152939092048b16838901528101548a16828701908152940154891681880190815285519283018652888352958201889052938101879052909401859052805183518716909152909416905291825190915063ffffffff16612075576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203421706174682066726f6d20696e70757420636f696e60448201526064016108af565b805163ffffffff166120e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f45786368616e67653a203421706174682066726f6d206f757420636f696e000060448201526064016108af565b806040015173ffffffffffffffffffffffffffffffffffffffff16826060015173ffffffffffffffffffffffffffffffffffffffff1614156121d65760408051600280825260608201909252600091816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612137579050509050828160008151811061219f5761219f61573d565b602002602001018190525081816001815181106121be576121be61573d565b6020026020010181905250809550505050505061083e565b606082015173ffffffffffffffffffffffffffffffffffffffff908116600090815260046020908152604080832085820151909416835292815282822080548451818402810184019095528085529293929091849084015b828210156122a95760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff640100000000909104811684860152600180830154821693850193909352600290910154166060830152908352909201910161222e565b505050509050600081511161231a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203421706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b60008151600261232a9190615803565b67ffffffffffffffff811115612342576123426157d4565b6040519080825280602002602001820160405280156123b257816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816123605790505b50905083816000815181106123c9576123c961573d565b60200260200101819052508281835160016123e49190615803565b815181106123f4576123f461573d565b602002602001018190525060005b82518110156124615782818151811061241d5761241d61573d565b6020026020010151828260016124339190615803565b815181106124435761244361573d565b602002602001018190525080806124599061579b565b915050612402565b50955061083e945050505050565b600061247b81336147ad565b8483146124e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b8581101561137557600460008888848181106125055761250561573d565b905060200201602081019061251a919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008686848181106125685761256861573d565b905060200201602081019061257d919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006125c391906151eb565b82156126ca576000600260008989858181106125e1576125e161573d565b90506020020160208101906125f6919061546f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600090812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091556002818787858181106126615761266161573d565b9050602002016020810190612676919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b806126d48161579b565b9150506124e7565b60006126e881336147ad565b8160005b81811015611230578484828181106127065761270661573d565b61271c9260206080909202019081019150615658565b63ffffffff16612788576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b84848281811061279a5761279a61573d565b90506080020160600160208101906127b2919061546f565b73ffffffffffffffffffffffffffffffffffffffff168585838181106127da576127da61573d565b90506080020160400160208101906127f2919061546f565b73ffffffffffffffffffffffffffffffffffffffff161415612870576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a2065646765206973206c6f6f700000000000000000000060448201526064016108af565b600360008686848181106128865761288661573d565b905060800201602001602081019061289e919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008686848181106128ec576128ec61573d565b9050608002016040016020810190612904919061546f565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16612a94576129aa8585838181106129475761294761573d565b905060800201602001602081019061295f919061546f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8787858181106129925761299261573d565b9050608002016040016020810190611085919061546f565b6001600360008787858181106129c2576129c261573d565b90506080020160200160208101906129da919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878785818110612a2857612a2861573d565b9050608002016040016020810190612a40919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b60036000868684818110612aaa57612aaa61573d565b9050608002016020016020810190612ac2919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868684818110612b1057612b1061573d565b9050608002016060016020810190612b28919061546f565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16612cb857612bce858583818110612b6b57612b6b61573d565b9050608002016020016020810190612b83919061546f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff878785818110612bb657612bb661573d565b9050608002016060016020810190611085919061546f565b600160036000878785818110612be657612be661573d565b9050608002016020016020810190612bfe919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878785818110612c4c57612c4c61573d565b9050608002016060016020810190612c64919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b848482818110612cca57612cca61573d565b90506080020160056000878785818110612ce657612ce661573d565b9050608002016040016020810190612cfe919061546f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020612d2e828261581b565b50819050612d3b8161579b565b9150506126ec565b6000612d4f81336147ad565b838214612db8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b8481101561119757612e01848483818110612dd857612dd861573d565b9050602002016020810190612ded919061546f565b60008888858181106110705761107061573d565b600060036000868685818110612e1957612e1961573d565b9050602002016020810190612e2e919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000888885818110612e7c57612e7c61573d565b9050602002016020810190612e91919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905580612eee8161579b565b915050612dbb565b6000612f0281336147ad565b60005b82811015610f8d576000848483818110612f2157612f2161573d565b9050602002810190612f339190615955565b808060200260200160405190810160405280939291908181526020016000905b82821015612f7f57612f70608083028601368190038101906159bd565b81526020019060010190612f53565b50505050509050600081600081518110612f9b57612f9b61573d565b602002602001015160400151905060008260018451612fba9190615a69565b81518110612fca57612fca61573d565b60200260200101516060015190508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561306e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f45786368616e67653a20726f757465206973206c6f6f7000000000000000000060448201526064016108af565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260046020908152604080832093851683529290522054156130e35773ffffffffffffffffffffffffffffffffffffffff808316600090815260046020908152604080832093851683529290529081206130e3916151eb565b826000815181106130f6576130f661573d565b60200260200101516000015163ffffffff1660001415613172576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b60036000846000815181106131895761318961573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000846000815181106131e4576131e461573d565b60209081029190910181015160409081015173ffffffffffffffffffffffffffffffffffffffff16835290820192909252016000205460ff1661337a576132a8836000815181106132375761323761573d565b6020026020010151602001517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff856000815181106132775761327761573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1661487f9092919063ffffffff16565b600160036000856000815181106132c1576132c161573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008560008151811061331c5761331c61573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8260008151811061338d5761338d61573d565b60200260200101516060015173ffffffffffffffffffffffffffffffffffffffff16836000815181106133c2576133c261573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff16141561344c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a2065646765206973206c6f6f700000000000000000000060448201526064016108af565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260046020908152604080832093851683529290529081208451909185916134925761349261573d565b602090810291909101810151825460018082018555600094855293839020825160039092020180549383015163ffffffff9092167fffffffffffffffff0000000000000000000000000000000000000000000000009094169390931764010000000073ffffffffffffffffffffffffffffffffffffffff92831602178355604082015183850180547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116928416929092179055606090920151600290930180549092169216919091179055835114156135d35773ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040808220805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00918216811790925593909416825290208054909116909117905550613b93565b6000836000815181106135e8576135e861573d565b60200260200101516060015190506000600190505b8451811015613b29578173ffffffffffffffffffffffffffffffffffffffff1685828151811061362f5761362f61573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff16146136b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a20726f7574652062726f6b656e0000000000000000000060448201526064016108af565b8481815181106136ca576136ca61573d565b60200260200101516060015191508481815181106136ea576136ea61573d565b60200260200101516000015163ffffffff1660001415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b8481815181106137785761377861573d565b60200260200101516060015173ffffffffffffffffffffffffffffffffffffffff168582815181106137ac576137ac61573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff161415613836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a2065646765206973206c6f6f700000000000000000000060448201526064016108af565b6003600086838151811061384c5761384c61573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008683815181106138a6576138a661573d565b60209081029190910181015160409081015173ffffffffffffffffffffffffffffffffffffffff16835290820192909252016000205460ff16613a07576139378582815181106138f8576138f861573d565b6020026020010151602001517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8784815181106132775761327761573d565b60016003600087848151811061394f5761394f61573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008784815181106139a9576139a961573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b73ffffffffffffffffffffffffffffffffffffffff80851660009081526004602090815260408083209387168352929052208551869083908110613a4d57613a4d61573d565b602090810291909101810151825460018082018555600094855293839020825160039092020180549383015163ffffffff9092167fffffffffffffffff0000000000000000000000000000000000000000000000009094169390931764010000000073ffffffffffffffffffffffffffffffffffffffff92831602178355604082015193830180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811695831695909517905560609091015160029092018054909316911617905580613b218161579b565b9150506135fd565b505073ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040808220805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009182168117909255939094168252902080549091169091179055505b80613b9d8161579b565b915050612f05565b6000613bb181336147ad565b8582148015613bbf57508184145b613c25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b86811015613f8a576000888883818110613c4457613c4461573d565b905060400201803603810190613c5a9190615a80565b805190915063ffffffff16613ccb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b60005b858584818110613ce057613ce061573d565b9050602002810190613cf29190615b06565b9050811015613ed65760208083015173ffffffffffffffffffffffffffffffffffffffff16600090815260039091526040812090878786818110613d3857613d3861573d565b9050602002810190613d4a9190615b06565b84818110613d5a57613d5a61573d565b9050602002016020810190613d6f919061546f565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16613ec457613dfa82602001517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff888887818110613dd857613dd861573d565b9050602002810190613dea9190615b06565b858181106110705761107061573d565b60208083015173ffffffffffffffffffffffffffffffffffffffff166000908152600390915260408120600191888887818110613e3957613e3961573d565b9050602002810190613e4b9190615b06565b85818110613e5b57613e5b61573d565b9050602002016020810190613e70919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b80613ece8161579b565b915050613cce565b508060066000898986818110613eee57613eee61573d565b9050602002016020810190613f03919061546f565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040909101600020835181549490930151909116640100000000027fffffffffffffffff00000000000000000000000000000000000000000000000090931663ffffffff909216919091179190911790555080613f828161579b565b915050613c28565b5050505050505050565b60008281526001602081905260409091200154613fb181336147ad565b6114238383614ac0565b6000613fc781336147ad565b60005b82811015610f8d5760056000858584818110613fe857613fe861573d565b9050602002016020810190613ffd919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffff0000000000000000000000000000000000000000000000001681556001810180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556002909101805490911690558061408c8161579b565b915050613fca565b3b151590565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610f8d9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614b7b565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260066020908152604080832081518083018352905463ffffffff811680835264010000000090910486168285015284526007909252822054919290911680614237576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2061646170746572206e6f7420666f756e64000000000060448201526064016108af565b602082015160405173ffffffffffffffffffffffffffffffffffffffff9182166024820152908716604482015260648101859052600090614332907f73ec962e00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915273ffffffffffffffffffffffffffffffffffffffff841690614c87565b9050808060200190518101906143489190615b6e565b93505050505b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114239084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016140f4565b73ffffffffffffffffffffffffffffffffffffffff808416600090815260066020908152604080832081518083018352905463ffffffff81168083526401000000009091048616828501528452600790925282205491929091168061446c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2061646170746572206e6f7420666f756e64000000000060448201526064016108af565b602082015160405173ffffffffffffffffffffffffffffffffffffffff9182166024820152908616604482015260648101859052600090614332907f660cb8d40000000000000000000000000000000000000000000000000000000090608401614298565b6000806144de85856115b3565b90508260005b82518110156146495760008382815181106145015761450161573d565b602090810291909101810151805163ffffffff166000908152600790925260409091205490915073ffffffffffffffffffffffffffffffffffffffff16806145a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2061646170746572206e6f7420666f756e64000000000060448201526064016108af565b60208201516040808401516060850151915173ffffffffffffffffffffffffffffffffffffffff93841660248201529083166044820152911660648201526084810185905260009061461b907f6012856e000000000000000000000000000000000000000000000000000000009060a401614298565b9050808060200190518101906146319190615b6e565b945050505080806146419061579b565b9150506144e4565b5095945050505050565b804710156146bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108af565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114614717576040519150601f19603f3d011682016040523d82523d6000602084013e61471c565b606091505b5050905080611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108af565b600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166114d7576148058173ffffffffffffffffffffffffffffffffffffffff166014614cac565b614810836020614cac565b604051602001614821929190615bb3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108af91600401615c34565b80158061491f57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156148f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061491d9190615b6e565b155b6149ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016108af565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114239084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016140f4565b600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166114d757600082815260016020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156114d757600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000614bdd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16614eef9092919063ffffffff16565b8051909150156114235780806020019051810190614bfb9190615c85565b611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108af565b606061434e8383604051806060016040528060278152602001615d3160279139614f06565b60606000614cbb836002615ca2565b614cc6906002615803565b67ffffffffffffffff811115614cde57614cde6157d4565b6040519080825280601f01601f191660200182016040528015614d08576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110614d3f57614d3f61573d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614da257614da261573d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614dde846002615ca2565b614de9906001615803565b90505b6001811115614e86577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614e2a57614e2a61573d565b1a60f81b828281518110614e4057614e4061573d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93614e7f81615cdf565b9050614dec565b50831561434e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108af565b6060614efe8484600085615018565b949350505050565b6060833b614f96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016108af565b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051614fbe9190615d14565b600060405180830381855af49150503d8060008114614ff9576040519150601f19603f3d011682016040523d82523d6000602084013e614ffe565b606091505b509150915061500e828286615198565b9695505050505050565b6060824710156150aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108af565b843b615112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108af565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161513b9190615d14565b60006040518083038185875af1925050503d8060008114615178576040519150601f19603f3d011682016040523d82523d6000602084013e61517d565b606091505b509150915061518d828286615198565b979650505050505050565b606083156151a757508161434e565b8251156151b75782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108af9190615c34565b508054600082556003029060005260206000209081019061520c919061520f565b50565b5b8082111561527e5780547fffffffffffffffff0000000000000000000000000000000000000000000000001681556001810180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556002820180549091169055600301615210565b5090565b60006020828403121561529457600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461434e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461520c57600080fd5b600080600080608085870312156152fc57600080fd5b8435615307816152c4565b93506020850135615317816152c4565b93969395505050506040820135916060013590565b60008083601f84011261533e57600080fd5b50813567ffffffffffffffff81111561535657600080fd5b6020830191508360208260051b850101111561537157600080fd5b9250929050565b6000806020838503121561538b57600080fd5b823567ffffffffffffffff8111156153a257600080fd5b6153ae8582860161532c565b90969095509350505050565b600080600080604085870312156153d057600080fd5b843567ffffffffffffffff808211156153e857600080fd5b6153f48883890161532c565b9096509450602087013591508082111561540d57600080fd5b5061541a8782880161532c565b95989497509550505050565b60006020828403121561543857600080fd5b5035919050565b6000806040838503121561545257600080fd5b823591506020830135615464816152c4565b809150509250929050565b60006020828403121561548157600080fd5b813561434e816152c4565b6000806040838503121561549f57600080fd5b82356154aa816152c4565b91506020830135615464816152c4565b602080825282518282018190526000919060409081850190868401855b82811015615532578151805163ffffffff1685528681015173ffffffffffffffffffffffffffffffffffffffff90811688870152868201518116878701526060918201511690850152608090930192908501906001016154d7565b5091979650505050505050565b801515811461520c57600080fd5b60008060008060006060868803121561556557600080fd5b853567ffffffffffffffff8082111561557d57600080fd5b61558989838a0161532c565b909750955060208801359150808211156155a257600080fd5b506155af8882890161532c565b90945092505060408601356155c38161553f565b809150509295509295909350565b600080602083850312156155e457600080fd5b823567ffffffffffffffff808211156155fc57600080fd5b818501915085601f83011261561057600080fd5b81358181111561561f57600080fd5b8660208260071b850101111561563457600080fd5b60209290920196919550909350505050565b63ffffffff8116811461520c57600080fd5b60006020828403121561566a57600080fd5b813561434e81615646565b6000806000806000806060878903121561568e57600080fd5b863567ffffffffffffffff808211156156a657600080fd5b818901915089601f8301126156ba57600080fd5b8135818111156156c957600080fd5b8a60208260061b85010111156156de57600080fd5b6020928301985096509088013590808211156156f957600080fd5b6157058a838b0161532c565b9096509450604089013591508082111561571e57600080fd5b5061572b89828a0161532c565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156157cd576157cd61576c565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082198211156158165761581661576c565b500190565b813561582681615646565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135615866816152c4565b77ffffffffffffffffffffffffffffffffffffffff000000008160201b16837fffffffffffffffff00000000000000000000000000000000000000000000000084161717845550505060408201356158bd816152c4565b6001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905550606082013561590e816152c4565b6002820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316179055505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261598a57600080fd5b83018035915067ffffffffffffffff8211156159a557600080fd5b6020019150600781901b360382131561537157600080fd5b6000608082840312156159cf57600080fd5b6040516080810181811067ffffffffffffffff82111715615a19577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235615a2781615646565b81526020830135615a37816152c4565b60208201526040830135615a4a816152c4565b60408201526060830135615a5d816152c4565b60608201529392505050565b600082821015615a7b57615a7b61576c565b500390565b600060408284031215615a9257600080fd5b6040516040810181811067ffffffffffffffff82111715615adc577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235615aea81615646565b81526020830135615afa816152c4565b60208201529392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615b3b57600080fd5b83018035915067ffffffffffffffff821115615b5657600080fd5b6020019150600581901b360382131561537157600080fd5b600060208284031215615b8057600080fd5b5051919050565b60005b83811015615ba2578181015183820152602001615b8a565b83811115610f8d5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615beb816017850160208801615b87565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615c28816028840160208801615b87565b01602801949350505050565b6020815260008251806020840152615c53816040850160208701615b87565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600060208284031215615c9757600080fd5b815161434e8161553f565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615cda57615cda61576c565b500290565b600081615cee57615cee61576c565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60008251615d26818460208701615b87565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f50808298d4d9faa62f51749a787fa676f1fb297fe68825117671552c75e201864736f6c634300080b00330000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x6080604052600436106101c65760003560e01c806372455246116100f7578063b2e59de111610095578063cfa57daf11610064578063cfa57daf14610717578063d547741f14610737578063e6e9d1cf14610757578063fd3a60971461077757600080fd5b8063b2e59de114610659578063b3a2c09714610694578063c91f014d146106b4578063ca0fdae0146106f757600080fd5b8063a217fddf116100d1578063a217fddf1461056c578063a2ac31d514610581578063af695a20146105b5578063b17b658d146105d557600080fd5b8063724552461461049457806391d14854146104b4578063a0caa45e1461050757600080fd5b8063265a9ca61161016457806336568abe1161013e57806336568abe1461037d5780635bc4696e1461039d5780635f3f0710146104475780636e8811021461047457600080fd5b8063265a9ca61461030d5780632f2ff15d1461032d578063326705ab1461034d57600080fd5b806314671a29116101a057806314671a291461024a578063170e2c8b1461029c5780631e6b208e146102bc578063248a9ca3146102dc57600080fd5b806301ffc9a7146101d25780630ed2fc951461020757806312e63e111461022857600080fd5b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004615282565b6107ab565b60405190151581526020015b60405180910390f35b61021a6102153660046152e6565b610844565b6040519081526020016101fe565b34801561023457600080fd5b50610248610243366004615378565b610eed565b005b34801561025657600080fd5b506008546102779073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b3480156102a857600080fd5b506102486102b73660046153ba565b610f93565b3480156102c857600080fd5b506102486102d7366004615378565b61119f565b3480156102e857600080fd5b5061021a6102f7366004615426565b6000908152600160208190526040909120015490565b34801561031957600080fd5b506102486103283660046153ba565b611237565b34801561033957600080fd5b5061024861034836600461543f565b61137e565b34801561035957600080fd5b506101f261036836600461546f565b60026020526000908152604090205460ff1681565b34801561038957600080fd5b5061024861039836600461543f565b611428565b3480156103a957600080fd5b506104046103b836600461546f565b60056020526000908152604090208054600182015460029092015463ffffffff82169273ffffffffffffffffffffffffffffffffffffffff640100000000909304831692908116911684565b6040805163ffffffff909516855273ffffffffffffffffffffffffffffffffffffffff9384166020860152918316918401919091521660608201526080016101fe565b34801561045357600080fd5b5061046761046236600461548c565b6114db565b6040516101fe91906154ba565b34801561048057600080fd5b5061046761048f36600461548c565b6115b3565b3480156104a057600080fd5b506102486104af36600461554d565b61246f565b3480156104c057600080fd5b506101f26104cf36600461543f565b600091825260016020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b34801561051357600080fd5b5061053b7f73ec962e0000000000000000000000000000000000000000000000000000000081565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101fe565b34801561057857600080fd5b5061021a600081565b34801561058d57600080fd5b5061053b7f660cb8d40000000000000000000000000000000000000000000000000000000081565b3480156105c157600080fd5b506102486105d03660046155d1565b6126dc565b3480156105e157600080fd5b506106286105f036600461546f565b60066020526000908152604090205463ffffffff811690640100000000900473ffffffffffffffffffffffffffffffffffffffff1682565b6040805163ffffffff909316835273ffffffffffffffffffffffffffffffffffffffff9091166020830152016101fe565b34801561066557600080fd5b506101f261067436600461548c565b600360209081526000928352604080842090915290825290205460ff1681565b3480156106a057600080fd5b506102486106af3660046153ba565b612d43565b3480156106c057600080fd5b506102776106cf366004615658565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b34801561070357600080fd5b50610248610712366004615378565b612ef6565b34801561072357600080fd5b50610248610732366004615675565b613ba5565b34801561074357600080fd5b5061024861075236600461543f565b613f94565b34801561076357600080fd5b50610248610772366004615378565b613fbb565b34801561078357600080fd5b5061053b7f6012856e0000000000000000000000000000000000000000000000000000000081565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061083e57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000600260005414156108b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260005573ffffffffffffffffffffffffffffffffffffffff8581169085161415610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2066726f6d203d3d20746f00000000000000000000000060448201526064016108af565b73ffffffffffffffffffffffffffffffffffffffff841660009081526006602052604090205463ffffffff1615610a345761099373ffffffffffffffffffffffffffffffffffffffff861633308661409a565b60006109a0868686614176565b905082811015610a0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45786368616e67653a20736c697070616765000000000000000000000000000060448201526064016108af565b610a2d73ffffffffffffffffffffffffffffffffffffffff86163383614355565b9050610ee0565b73ffffffffffffffffffffffffffffffffffffffff851660009081526006602052604090205463ffffffff1615610a9457610a8773ffffffffffffffffffffffffffffffffffffffff861633308661409a565b60006109a08686866143ab565b73ffffffffffffffffffffffffffffffffffffffff85161580610ae0575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff8616145b15610cae5773ffffffffffffffffffffffffffffffffffffffff841615801590610b34575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff851614155b610b9a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f45786368616e67653a2045544820746f2045544800000000000000000000000060448201526064016108af565b348314610c03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f45786368616e67653a2076616c75652f616d6f756e742064697363726570000060448201526064016108af565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c6d57600080fd5b505af1158015610c81573d6000803e3d6000fd5b5050600854600093506109a0925073ffffffffffffffffffffffffffffffffffffffff16905086866144d1565b610cd073ffffffffffffffffffffffffffffffffffffffff861633308661409a565b73ffffffffffffffffffffffffffffffffffffffff84161580610d1c575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee73ffffffffffffffffffffffffffffffffffffffff8516145b15610e4357600854600090610d4990879073ffffffffffffffffffffffffffffffffffffffff16866144d1565b905082811015610db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45786368616e67653a20736c697070616765000000000000000000000000000060448201526064016108af565b6008546040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90602401600060405180830381600087803b158015610e2157600080fd5b505af1158015610e35573d6000803e3d6000fd5b50505050610a2d3382614653565b6000610e508686866144d1565b905082811015610ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f45786368616e67653a20736c697070616765000000000000000000000000000060448201526064016108af565b610edd73ffffffffffffffffffffffffffffffffffffffff86163383614355565b90505b6001600055949350505050565b6000610ef981336147ad565b60005b82811015610f8d5760066000858584818110610f1a57610f1a61573d565b9050602002016020810190610f2f919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffff00000000000000000000000000000000000000000000000016905580610f858161579b565b915050610efc565b50505050565b6000610f9f81336147ad565b838214611008576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b84811015611197576110a28484838181106110285761102861573d565b905060200201602081019061103d919061546f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8888858181106110705761107061573d565b9050602002016020810190611085919061546f565b73ffffffffffffffffffffffffffffffffffffffff16919061487f565b6001600360008686858181106110ba576110ba61573d565b90506020020160208101906110cf919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088888581811061111d5761111d61573d565b9050602002016020810190611132919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790558061118f8161579b565b91505061100b565b505050505050565b60006111ab81336147ad565b8160005b8181101561123057600760008686848181106111cd576111cd61573d565b90506020020160208101906111e29190615658565b63ffffffff168152602081019190915260400160002080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055806112288161579b565b9150506111af565b5050505050565b600061124381336147ad565b838281146112ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b81811015611375578686828181106112ca576112ca61573d565b90506020020160208101906112df919061546f565b600760008787858181106112f5576112f561573d565b905060200201602081019061130a9190615658565b63ffffffff168152602081019190915260400160002080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790558061136d8161579b565b9150506112b0565b50505050505050565b6000828152600160208190526040909120015461139b81336147ad565b73ffffffffffffffffffffffffffffffffffffffff82163b611419576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a206e6f7420636f6e74726163740000000000000000000060448201526064016108af565b6114238383614a01565b505050565b73ffffffffffffffffffffffffffffffffffffffff811633146114cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108af565b6114d78282614ac0565b5050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526004602090815260408083209385168352928152828220805484518184028101840190955280855260609493919290919084015b828210156115a75760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff640100000000909104811684860152600180830154821693850193909352600290910154166060830152908352909201910161152c565b50505050905092915050565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526002602052604080822054928416825290205460609160ff90811691168180156115f75750805b156117415773ffffffffffffffffffffffffffffffffffffffff8086166000908152600460209081526040808320938816835292815282822080548451818402810184019095528085529293929091849084015b828210156116c65760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff640100000000909104811684860152600180830154821693850193909352600290910154166060830152908352909201910161164b565b5050505090506000815111611737576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203121706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b925061083e915050565b8115801561174c5750805b15611b595773ffffffffffffffffffffffffffffffffffffffff8086166000908152600560209081526040918290208251608081018452815463ffffffff8116808352640100000000909104861693820193909352600182015485169381019390935260020154909216606082015290611822576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203221706174682066726f6d20696e70757420636f696e60448201526064016108af565b8473ffffffffffffffffffffffffffffffffffffffff16816060015173ffffffffffffffffffffffffffffffffffffffff1614156118f057604080516001808252818301909252600091816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161187157905050905081816000815181106118d9576118d961573d565b60200260200101819052508094505050505061083e565b606081015173ffffffffffffffffffffffffffffffffffffffff9081166000908152600460209081526040808320938916835292815282822080548451818402810184019095528085529293929091849084015b828210156119bf5760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff6401000000009091048116848601526001808301548216938501939093526002909101541660608301529083529092019101611944565b5050505090506000815111611a30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203221706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b600081516001611a409190615803565b67ffffffffffffffff811115611a5857611a586157d4565b604051908082528060200260200182016040528015611ac857816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181611a765790505b5090508281600081518110611adf57611adf61573d565b602002602001018190525060005b8251811015611b4c57828181518110611b0857611b0861573d565b602002602001015182826001611b1e9190615803565b81518110611b2e57611b2e61573d565b60200260200101819052508080611b449061579b565b915050611aed565b50945061083e9350505050565b818015611b64575080155b15611f355773ffffffffffffffffffffffffffffffffffffffff8481166000908152600560209081526040808320815160808082018452825463ffffffff80821684526401000000009091048816838701526001840154881683860190815260029094015488166060808501918252865193840187528884529683018890529482018790529401949094528051825186169091529093169092528051909116611c69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203321706174682066726f6d20696e70757420636f696e60448201526064016108af565b8573ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff161415611ce657604080516001815260c0810182526000918101828152606082018390526080820183905260a0820183905260208201528051909183918391906118d9576118d961573d565b73ffffffffffffffffffffffffffffffffffffffff808716600090815260046020908152604080832085820151909416835292815282822080548451818402810184019095528085529293929091849084015b82821015611db45760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff6401000000009091048116848601526001808301548216938501939093526002909101541660608301529083529092019101611d39565b5050505090506000815111611e25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203321706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b600081516001611e359190615803565b67ffffffffffffffff811115611e4d57611e4d6157d4565b604051908082528060200260200182016040528015611ebd57816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181611e6b5790505b5090508281835181518110611ed457611ed461573d565b602002602001018190525060005b8251811015611b4c57828181518110611efd57611efd61573d565b6020026020010151828281518110611f1757611f1761573d565b60200260200101819052508080611f2d9061579b565b915050611ee2565b73ffffffffffffffffffffffffffffffffffffffff8581166000908152600560208181526040808420815160808082018452825463ffffffff8082168452640100000000918290048a16848801526001808601548b16858801526002958601548b166060808701919091528f8c168b52988852868a208751808601895281549384168152939092048b16838901528101548a16828701908152940154891681880190815285519283018652888352958201889052938101879052909401859052805183518716909152909416905291825190915063ffffffff16612075576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203421706174682066726f6d20696e70757420636f696e60448201526064016108af565b805163ffffffff166120e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f45786368616e67653a203421706174682066726f6d206f757420636f696e000060448201526064016108af565b806040015173ffffffffffffffffffffffffffffffffffffffff16826060015173ffffffffffffffffffffffffffffffffffffffff1614156121d65760408051600280825260608201909252600091816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181612137579050509050828160008151811061219f5761219f61573d565b602002602001018190525081816001815181106121be576121be61573d565b6020026020010181905250809550505050505061083e565b606082015173ffffffffffffffffffffffffffffffffffffffff908116600090815260046020908152604080832085820151909416835292815282822080548451818402810184019095528085529293929091849084015b828210156122a95760008481526020908190206040805160808101825260038602909201805463ffffffff8116845273ffffffffffffffffffffffffffffffffffffffff640100000000909104811684860152600180830154821693850193909352600290910154166060830152908352909201910161222e565b505050509050600081511161231a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f45786368616e67653a203421706174682066726f6d206d616a6f7220636f696e60448201526064016108af565b60008151600261232a9190615803565b67ffffffffffffffff811115612342576123426157d4565b6040519080825280602002602001820160405280156123b257816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816123605790505b50905083816000815181106123c9576123c961573d565b60200260200101819052508281835160016123e49190615803565b815181106123f4576123f461573d565b602002602001018190525060005b82518110156124615782818151811061241d5761241d61573d565b6020026020010151828260016124339190615803565b815181106124435761244361573d565b602002602001018190525080806124599061579b565b915050612402565b50955061083e945050505050565b600061247b81336147ad565b8483146124e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b8581101561137557600460008888848181106125055761250561573d565b905060200201602081019061251a919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008686848181106125685761256861573d565b905060200201602081019061257d919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006125c391906151eb565b82156126ca576000600260008989858181106125e1576125e161573d565b90506020020160208101906125f6919061546f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600090812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016921515929092179091556002818787858181106126615761266161573d565b9050602002016020810190612676919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b806126d48161579b565b9150506124e7565b60006126e881336147ad565b8160005b81811015611230578484828181106127065761270661573d565b61271c9260206080909202019081019150615658565b63ffffffff16612788576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b84848281811061279a5761279a61573d565b90506080020160600160208101906127b2919061546f565b73ffffffffffffffffffffffffffffffffffffffff168585838181106127da576127da61573d565b90506080020160400160208101906127f2919061546f565b73ffffffffffffffffffffffffffffffffffffffff161415612870576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a2065646765206973206c6f6f700000000000000000000060448201526064016108af565b600360008686848181106128865761288661573d565b905060800201602001602081019061289e919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008686848181106128ec576128ec61573d565b9050608002016040016020810190612904919061546f565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16612a94576129aa8585838181106129475761294761573d565b905060800201602001602081019061295f919061546f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8787858181106129925761299261573d565b9050608002016040016020810190611085919061546f565b6001600360008787858181106129c2576129c261573d565b90506080020160200160208101906129da919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878785818110612a2857612a2861573d565b9050608002016040016020810190612a40919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b60036000868684818110612aaa57612aaa61573d565b9050608002016020016020810190612ac2919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000868684818110612b1057612b1061573d565b9050608002016060016020810190612b28919061546f565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16612cb857612bce858583818110612b6b57612b6b61573d565b9050608002016020016020810190612b83919061546f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff878785818110612bb657612bb661573d565b9050608002016060016020810190611085919061546f565b600160036000878785818110612be657612be661573d565b9050608002016020016020810190612bfe919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000878785818110612c4c57612c4c61573d565b9050608002016060016020810190612c64919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b848482818110612cca57612cca61573d565b90506080020160056000878785818110612ce657612ce661573d565b9050608002016040016020810190612cfe919061546f565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020612d2e828261581b565b50819050612d3b8161579b565b9150506126ec565b6000612d4f81336147ad565b838214612db8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b8481101561119757612e01848483818110612dd857612dd861573d565b9050602002016020810190612ded919061546f565b60008888858181106110705761107061573d565b600060036000868685818110612e1957612e1961573d565b9050602002016020810190612e2e919061546f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000888885818110612e7c57612e7c61573d565b9050602002016020810190612e91919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905580612eee8161579b565b915050612dbb565b6000612f0281336147ad565b60005b82811015610f8d576000848483818110612f2157612f2161573d565b9050602002810190612f339190615955565b808060200260200160405190810160405280939291908181526020016000905b82821015612f7f57612f70608083028601368190038101906159bd565b81526020019060010190612f53565b50505050509050600081600081518110612f9b57612f9b61573d565b602002602001015160400151905060008260018451612fba9190615a69565b81518110612fca57612fca61573d565b60200260200101516060015190508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561306e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f45786368616e67653a20726f757465206973206c6f6f7000000000000000000060448201526064016108af565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260046020908152604080832093851683529290522054156130e35773ffffffffffffffffffffffffffffffffffffffff808316600090815260046020908152604080832093851683529290529081206130e3916151eb565b826000815181106130f6576130f661573d565b60200260200101516000015163ffffffff1660001415613172576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b60036000846000815181106131895761318961573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000846000815181106131e4576131e461573d565b60209081029190910181015160409081015173ffffffffffffffffffffffffffffffffffffffff16835290820192909252016000205460ff1661337a576132a8836000815181106132375761323761573d565b6020026020010151602001517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff856000815181106132775761327761573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1661487f9092919063ffffffff16565b600160036000856000815181106132c1576132c161573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008560008151811061331c5761331c61573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8260008151811061338d5761338d61573d565b60200260200101516060015173ffffffffffffffffffffffffffffffffffffffff16836000815181106133c2576133c261573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff16141561344c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a2065646765206973206c6f6f700000000000000000000060448201526064016108af565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260046020908152604080832093851683529290529081208451909185916134925761349261573d565b602090810291909101810151825460018082018555600094855293839020825160039092020180549383015163ffffffff9092167fffffffffffffffff0000000000000000000000000000000000000000000000009094169390931764010000000073ffffffffffffffffffffffffffffffffffffffff92831602178355604082015183850180547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116928416929092179055606090920151600290930180549092169216919091179055835114156135d35773ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040808220805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00918216811790925593909416825290208054909116909117905550613b93565b6000836000815181106135e8576135e861573d565b60200260200101516060015190506000600190505b8451811015613b29578173ffffffffffffffffffffffffffffffffffffffff1685828151811061362f5761362f61573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff16146136b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a20726f7574652062726f6b656e0000000000000000000060448201526064016108af565b8481815181106136ca576136ca61573d565b60200260200101516060015191508481815181106136ea576136ea61573d565b60200260200101516000015163ffffffff1660001415613766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b8481815181106137785761377861573d565b60200260200101516060015173ffffffffffffffffffffffffffffffffffffffff168582815181106137ac576137ac61573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff161415613836576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f45786368616e67653a2065646765206973206c6f6f700000000000000000000060448201526064016108af565b6003600086838151811061384c5761384c61573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008683815181106138a6576138a661573d565b60209081029190910181015160409081015173ffffffffffffffffffffffffffffffffffffffff16835290820192909252016000205460ff16613a07576139378582815181106138f8576138f861573d565b6020026020010151602001517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8784815181106132775761327761573d565b60016003600087848151811061394f5761394f61573d565b60200260200101516020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008784815181106139a9576139a961573d565b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b73ffffffffffffffffffffffffffffffffffffffff80851660009081526004602090815260408083209387168352929052208551869083908110613a4d57613a4d61573d565b602090810291909101810151825460018082018555600094855293839020825160039092020180549383015163ffffffff9092167fffffffffffffffff0000000000000000000000000000000000000000000000009094169390931764010000000073ffffffffffffffffffffffffffffffffffffffff92831602178355604082015193830180547fffffffffffffffffffffffff000000000000000000000000000000000000000090811695831695909517905560609091015160029092018054909316911617905580613b218161579b565b9150506135fd565b505073ffffffffffffffffffffffffffffffffffffffff918216600090815260026020526040808220805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009182168117909255939094168252902080549091169091179055505b80613b9d8161579b565b915050612f05565b6000613bb181336147ad565b8582148015613bbf57508184145b613c25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45786368616e67653a206c656e6774682064697363726570000000000000000060448201526064016108af565b60005b86811015613f8a576000888883818110613c4457613c4461573d565b905060400201803603810190613c5a9190615a80565b805190915063ffffffff16613ccb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f45786368616e67653a2070726f746f636f6c207479706520217365740000000060448201526064016108af565b60005b858584818110613ce057613ce061573d565b9050602002810190613cf29190615b06565b9050811015613ed65760208083015173ffffffffffffffffffffffffffffffffffffffff16600090815260039091526040812090878786818110613d3857613d3861573d565b9050602002810190613d4a9190615b06565b84818110613d5a57613d5a61573d565b9050602002016020810190613d6f919061546f565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16613ec457613dfa82602001517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff888887818110613dd857613dd861573d565b9050602002810190613dea9190615b06565b858181106110705761107061573d565b60208083015173ffffffffffffffffffffffffffffffffffffffff166000908152600390915260408120600191888887818110613e3957613e3961573d565b9050602002810190613e4b9190615b06565b85818110613e5b57613e5b61573d565b9050602002016020810190613e70919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790555b80613ece8161579b565b915050613cce565b508060066000898986818110613eee57613eee61573d565b9050602002016020810190613f03919061546f565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040909101600020835181549490930151909116640100000000027fffffffffffffffff00000000000000000000000000000000000000000000000090931663ffffffff909216919091179190911790555080613f828161579b565b915050613c28565b5050505050505050565b60008281526001602081905260409091200154613fb181336147ad565b6114238383614ac0565b6000613fc781336147ad565b60005b82811015610f8d5760056000858584818110613fe857613fe861573d565b9050602002016020810190613ffd919061546f565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffff0000000000000000000000000000000000000000000000001681556001810180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556002909101805490911690558061408c8161579b565b915050613fca565b3b151590565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610f8d9085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152614b7b565b73ffffffffffffffffffffffffffffffffffffffff808316600090815260066020908152604080832081518083018352905463ffffffff811680835264010000000090910486168285015284526007909252822054919290911680614237576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2061646170746572206e6f7420666f756e64000000000060448201526064016108af565b602082015160405173ffffffffffffffffffffffffffffffffffffffff9182166024820152908716604482015260648101859052600090614332907f73ec962e00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915273ffffffffffffffffffffffffffffffffffffffff841690614c87565b9050808060200190518101906143489190615b6e565b93505050505b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114239084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016140f4565b73ffffffffffffffffffffffffffffffffffffffff808416600090815260066020908152604080832081518083018352905463ffffffff81168083526401000000009091048616828501528452600790925282205491929091168061446c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2061646170746572206e6f7420666f756e64000000000060448201526064016108af565b602082015160405173ffffffffffffffffffffffffffffffffffffffff9182166024820152908616604482015260648101859052600090614332907f660cb8d40000000000000000000000000000000000000000000000000000000090608401614298565b6000806144de85856115b3565b90508260005b82518110156146495760008382815181106145015761450161573d565b602090810291909101810151805163ffffffff166000908152600790925260409091205490915073ffffffffffffffffffffffffffffffffffffffff16806145a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f45786368616e67653a2061646170746572206e6f7420666f756e64000000000060448201526064016108af565b60208201516040808401516060850151915173ffffffffffffffffffffffffffffffffffffffff93841660248201529083166044820152911660648201526084810185905260009061461b907f6012856e000000000000000000000000000000000000000000000000000000009060a401614298565b9050808060200190518101906146319190615b6e565b945050505080806146419061579b565b9150506144e4565b5095945050505050565b804710156146bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108af565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114614717576040519150601f19603f3d011682016040523d82523d6000602084013e61471c565b606091505b5050905080611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108af565b600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166114d7576148058173ffffffffffffffffffffffffffffffffffffffff166014614cac565b614810836020614cac565b604051602001614821929190615bb3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108af91600401615c34565b80158061491f57506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156148f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061491d9190615b6e565b155b6149ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084016108af565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114239084907f095ea7b300000000000000000000000000000000000000000000000000000000906064016140f4565b600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff166114d757600082815260016020818152604080842073ffffffffffffffffffffffffffffffffffffffff8616808652925280842080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16156114d757600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000614bdd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16614eef9092919063ffffffff16565b8051909150156114235780806020019051810190614bfb9190615c85565b611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108af565b606061434e8383604051806060016040528060278152602001615d3160279139614f06565b60606000614cbb836002615ca2565b614cc6906002615803565b67ffffffffffffffff811115614cde57614cde6157d4565b6040519080825280601f01601f191660200182016040528015614d08576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110614d3f57614d3f61573d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110614da257614da261573d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000614dde846002615ca2565b614de9906001615803565b90505b6001811115614e86577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110614e2a57614e2a61573d565b1a60f81b828281518110614e4057614e4061573d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93614e7f81615cdf565b9050614dec565b50831561434e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108af565b6060614efe8484600085615018565b949350505050565b6060833b614f96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016108af565b6000808573ffffffffffffffffffffffffffffffffffffffff1685604051614fbe9190615d14565b600060405180830381855af49150503d8060008114614ff9576040519150601f19603f3d011682016040523d82523d6000602084013e614ffe565b606091505b509150915061500e828286615198565b9695505050505050565b6060824710156150aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108af565b843b615112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108af565b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161513b9190615d14565b60006040518083038185875af1925050503d8060008114615178576040519150601f19603f3d011682016040523d82523d6000602084013e61517d565b606091505b509150915061518d828286615198565b979650505050505050565b606083156151a757508161434e565b8251156151b75782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108af9190615c34565b508054600082556003029060005260206000209081019061520c919061520f565b50565b5b8082111561527e5780547fffffffffffffffff0000000000000000000000000000000000000000000000001681556001810180547fffffffffffffffffffffffff00000000000000000000000000000000000000009081169091556002820180549091169055600301615210565b5090565b60006020828403121561529457600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461434e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461520c57600080fd5b600080600080608085870312156152fc57600080fd5b8435615307816152c4565b93506020850135615317816152c4565b93969395505050506040820135916060013590565b60008083601f84011261533e57600080fd5b50813567ffffffffffffffff81111561535657600080fd5b6020830191508360208260051b850101111561537157600080fd5b9250929050565b6000806020838503121561538b57600080fd5b823567ffffffffffffffff8111156153a257600080fd5b6153ae8582860161532c565b90969095509350505050565b600080600080604085870312156153d057600080fd5b843567ffffffffffffffff808211156153e857600080fd5b6153f48883890161532c565b9096509450602087013591508082111561540d57600080fd5b5061541a8782880161532c565b95989497509550505050565b60006020828403121561543857600080fd5b5035919050565b6000806040838503121561545257600080fd5b823591506020830135615464816152c4565b809150509250929050565b60006020828403121561548157600080fd5b813561434e816152c4565b6000806040838503121561549f57600080fd5b82356154aa816152c4565b91506020830135615464816152c4565b602080825282518282018190526000919060409081850190868401855b82811015615532578151805163ffffffff1685528681015173ffffffffffffffffffffffffffffffffffffffff90811688870152868201518116878701526060918201511690850152608090930192908501906001016154d7565b5091979650505050505050565b801515811461520c57600080fd5b60008060008060006060868803121561556557600080fd5b853567ffffffffffffffff8082111561557d57600080fd5b61558989838a0161532c565b909750955060208801359150808211156155a257600080fd5b506155af8882890161532c565b90945092505060408601356155c38161553f565b809150509295509295909350565b600080602083850312156155e457600080fd5b823567ffffffffffffffff808211156155fc57600080fd5b818501915085601f83011261561057600080fd5b81358181111561561f57600080fd5b8660208260071b850101111561563457600080fd5b60209290920196919550909350505050565b63ffffffff8116811461520c57600080fd5b60006020828403121561566a57600080fd5b813561434e81615646565b6000806000806000806060878903121561568e57600080fd5b863567ffffffffffffffff808211156156a657600080fd5b818901915089601f8301126156ba57600080fd5b8135818111156156c957600080fd5b8a60208260061b85010111156156de57600080fd5b6020928301985096509088013590808211156156f957600080fd5b6157058a838b0161532c565b9096509450604089013591508082111561571e57600080fd5b5061572b89828a0161532c565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156157cd576157cd61576c565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082198211156158165761581661576c565b500190565b813561582681615646565b63ffffffff811690508154817fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000082161783556020840135615866816152c4565b77ffffffffffffffffffffffffffffffffffffffff000000008160201b16837fffffffffffffffff00000000000000000000000000000000000000000000000084161717845550505060408201356158bd816152c4565b6001820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff831617905550606082013561590e816152c4565b6002820180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316179055505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261598a57600080fd5b83018035915067ffffffffffffffff8211156159a557600080fd5b6020019150600781901b360382131561537157600080fd5b6000608082840312156159cf57600080fd5b6040516080810181811067ffffffffffffffff82111715615a19577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235615a2781615646565b81526020830135615a37816152c4565b60208201526040830135615a4a816152c4565b60408201526060830135615a5d816152c4565b60608201529392505050565b600082821015615a7b57615a7b61576c565b500390565b600060408284031215615a9257600080fd5b6040516040810181811067ffffffffffffffff82111715615adc577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528235615aea81615646565b81526020830135615afa816152c4565b60208201529392505050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615b3b57600080fd5b83018035915067ffffffffffffffff821115615b5657600080fd5b6020019150600581901b360382131561537157600080fd5b600060208284031215615b8057600080fd5b5051919050565b60005b83811015615ba2578181015183820152602001615b8a565b83811115610f8d5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615beb816017850160208801615b87565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615c28816028840160208801615b87565b01602801949350505050565b6020815260008251806020840152615c53816040850160208701615b87565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b600060208284031215615c9757600080fd5b815161434e8161553f565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615cda57615cda61576c565b500290565b600081615cee57615cee61576c565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60008251615d26818460208701615b87565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f50808298d4d9faa62f51749a787fa676f1fb297fe68825117671552c75e201864736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : gnosis (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F
Arg [1] : isTesting (bool): True
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.