Source Code
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
NewUniswapV2Router
Compiler Version
v0.7.5+commit.eb77ed08
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// File: original_contracts/ITokenTransferProxy.sol
pragma solidity 0.7.5;
interface ITokenTransferProxy {
function transferFrom(
address token,
address from,
address to,
uint256 amount
)
external;
}
// File: original_contracts/AugustusStorage.sol
pragma solidity 0.7.5;
contract AugustusStorage {
struct FeeStructure {
uint256 partnerShare;
bool noPositiveSlippage;
bool positiveSlippageToUser;
uint16 feePercent;
string partnerId;
bytes data;
}
ITokenTransferProxy internal tokenTransferProxy;
address payable internal feeWallet;
mapping(address => FeeStructure) internal registeredPartners;
mapping (bytes4 => address) internal selectorVsRouter;
mapping (bytes32 => bool) internal adapterInitialized;
mapping (bytes32 => bytes) internal adapterVsData;
mapping (bytes32 => bytes) internal routerData;
mapping (bytes32 => bool) internal routerInitialized;
bytes32 public constant WHITELISTED_ROLE = keccak256("WHITELISTED_ROLE");
bytes32 public constant ROUTER_ROLE = keccak256("ROUTER_ROLE");
}
// File: original_contracts/routers/IRouter.sol
pragma solidity 0.7.5;
interface IRouter {
/**
* @dev Certain routers/exchanges needs to be initialized.
* This method will be called from Augustus
*/
function initialize(bytes calldata data) external;
/**
* @dev Returns unique identifier for the router
*/
function getKey() external pure returns(bytes32);
event Swapped2(
bytes16 uuid,
address partner,
uint256 feePercent,
address initiator,
address indexed beneficiary,
address indexed srcToken,
address indexed destToken,
uint256 srcAmount,
uint256 receivedAmount,
uint256 expectedAmount
);
event Bought2(
bytes16 uuid,
address partner,
uint256 feePercent,
address initiator,
address indexed beneficiary,
address indexed srcToken,
address indexed destToken,
uint256 srcAmount,
uint256 receivedAmount
);
}
// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol
pragma solidity >=0.6.0 <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);
}
// File: original_contracts/lib/weth/IWETH.sol
pragma solidity 0.7.5;
abstract contract IWETH is IERC20 {
function deposit() external virtual payable;
function withdraw(uint256 amount) external virtual;
}
// File: original_contracts/lib/uniswapv2/IUniswapV2Pair.sol
pragma solidity 0.7.5;
interface IUniswapV2Pair {
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function swap(
uint amount0Out,
uint amount1Out,
address to,
bytes calldata data
)
external;
}
// File: openzeppelin-solidity/contracts/math/SafeMath.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
// File: original_contracts/lib/uniswapv2/NewUniswapV2Lib.sol
pragma solidity 0.7.5;
library NewUniswapV2Lib {
using SafeMath for uint256;
function getReservesByPair(
address pair,
bool direction
)
internal
view
returns (uint256 reserveIn, uint256 reserveOut)
{
(uint256 reserve0, uint256 reserve1,) = IUniswapV2Pair(pair).getReserves();
(reserveIn, reserveOut) = direction ? (reserve0, reserve1) : (reserve1, reserve0);
}
function getAmountOut(
uint256 amountIn,
address pair,
bool direction,
uint256 fee
)
internal
view
returns (uint256 amountOut)
{
require(amountIn > 0, "UniswapV2Lib: INSUFFICIENT_INPUT_AMOUNT");
(uint256 reserveIn, uint256 reserveOut) = getReservesByPair(pair, direction);
uint256 amountInWithFee = amountIn.mul(fee);
uint256 numerator = amountInWithFee.mul(reserveOut);
uint256 denominator = reserveIn.mul(10000).add(amountInWithFee);
amountOut = uint256(numerator / denominator);
}
function getAmountIn(
uint256 amountOut,
address pair,
bool direction,
uint256 fee
)
internal
view
returns (uint256 amountIn)
{
require(amountOut > 0, "UniswapV2Lib: INSUFFICIENT_OUTPUT_AMOUNT");
(uint256 reserveIn, uint256 reserveOut) = getReservesByPair(pair, direction);
require(reserveOut > amountOut, "UniswapV2Lib: reserveOut should be greater than amountOut");
uint256 numerator = reserveIn.mul(amountOut).mul(10000);
uint256 denominator = reserveOut.sub(amountOut).mul(fee);
amountIn = (numerator / denominator).add(1);
}
}
// File: openzeppelin-solidity/contracts/utils/Address.sol
pragma solidity >=0.6.2 <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;
// solhint-disable-next-line no-inline-assembly
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");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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");
// solhint-disable-next-line avoid-low-level-calls
(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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol
pragma solidity >=0.6.0 <0.8.0;
/**
* @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 SafeMath for uint256;
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'
// solhint-disable-next-line max-line-length
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).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_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
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// File: original_contracts/lib/Utils.sol
pragma solidity 0.7.5;
pragma experimental ABIEncoderV2;
interface IERC20Permit {
function permit(address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
}
interface IERC20PermitLegacy {
function permit(address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s) external;
}
library Utils {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address constant ETH_ADDRESS = address(
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
);
uint256 constant MAX_UINT = type(uint256).max;
/**
* @param fromToken Address of the source token
* @param fromAmount Amount of source tokens to be swapped
* @param toAmount Minimum destination token amount expected out of this swap
* @param expectedAmount Expected amount of destination tokens without slippage
* @param beneficiary Beneficiary address
* 0 then 100% will be transferred to beneficiary. Pass 10000 for 100%
* @param path Route to be taken for this swap to take place
*/
struct SellData {
address fromToken;
uint256 fromAmount;
uint256 toAmount;
uint256 expectedAmount;
address payable beneficiary;
Utils.Path[] path;
address payable partner;
uint256 feePercent;
bytes permit;
uint256 deadline;
bytes16 uuid;
}
struct BuyData {
address adapter;
address fromToken;
address toToken;
uint256 fromAmount;
uint256 toAmount;
address payable beneficiary;
Utils.Route[] route;
address payable partner;
uint256 feePercent;
bytes permit;
uint256 deadline;
bytes16 uuid;
}
struct MegaSwapSellData {
address fromToken;
uint256 fromAmount;
uint256 toAmount;
uint256 expectedAmount;
address payable beneficiary;
Utils.MegaSwapPath[] path;
address payable partner;
uint256 feePercent;
bytes permit;
uint256 deadline;
bytes16 uuid;
}
struct SimpleData {
address fromToken;
address toToken;
uint256 fromAmount;
uint256 toAmount;
uint256 expectedAmount;
address[] callees;
bytes exchangeData;
uint256[] startIndexes;
uint256[] values;
address payable beneficiary;
address payable partner;
uint256 feePercent;
bytes permit;
uint256 deadline;
bytes16 uuid;
}
struct Adapter {
address payable adapter;
uint256 percent;
uint256 networkFee;//NOT USED
Route[] route;
}
struct Route {
uint256 index;//Adapter at which index needs to be used
address targetExchange;
uint percent;
bytes payload;
uint256 networkFee;//NOT USED - Network fee is associated with 0xv3 trades
}
struct MegaSwapPath {
uint256 fromAmountPercent;
Path[] path;
}
struct Path {
address to;
uint256 totalNetworkFee;//NOT USED - Network fee is associated with 0xv3 trades
Adapter[] adapters;
}
function ethAddress() internal pure returns (address) {return ETH_ADDRESS;}
function maxUint() internal pure returns (uint256) {return MAX_UINT;}
function approve(
address addressToApprove,
address token,
uint256 amount
) internal {
if (token != ETH_ADDRESS) {
IERC20 _token = IERC20(token);
uint allowance = _token.allowance(address(this), addressToApprove);
if (allowance < amount) {
_token.safeApprove(addressToApprove, 0);
_token.safeIncreaseAllowance(addressToApprove, MAX_UINT);
}
}
}
function transferTokens(
address token,
address payable destination,
uint256 amount
)
internal
{
if (amount > 0) {
if (token == ETH_ADDRESS) {
(bool result, ) = destination.call{value: amount, gas: 10000}("");
require(result, "Failed to transfer Ether");
}
else {
IERC20(token).safeTransfer(destination, amount);
}
}
}
function tokenBalance(
address token,
address account
)
internal
view
returns (uint256)
{
if (token == ETH_ADDRESS) {
return account.balance;
} else {
return IERC20(token).balanceOf(account);
}
}
function permit(
address token,
bytes memory permit
)
internal
{
if (permit.length == 32 * 7) {
(bool success,) = token.call(abi.encodePacked(IERC20Permit.permit.selector, permit));
require(success, "Permit failed");
}
if (permit.length == 32 * 8) {
(bool success,) = token.call(abi.encodePacked(IERC20PermitLegacy.permit.selector, permit));
require(success, "Permit failed");
}
}
}
// File: @uniswap/lib/contracts/libraries/TransferHelper.sol
pragma solidity >=0.6.0;
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
function safeApprove(address token, address to, uint value) internal {
// bytes4(keccak256(bytes('approve(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
}
function safeTransfer(address token, address to, uint value) internal {
// bytes4(keccak256(bytes('transfer(address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
}
function safeTransferFrom(address token, address from, address to, uint value) internal {
// bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
}
function safeTransferETH(address to, uint value) internal {
(bool success,) = to.call{value:value}(new bytes(0));
require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
}
}
// File: original_contracts/routers/NewUniswapV2Router.sol
pragma solidity 0.7.5;
contract NewUniswapV2Router is AugustusStorage, IRouter {
using SafeMath for uint256;
address constant ETH_IDENTIFIER = address(
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
);
// Pool bits are 255-161: fee, 160: direction flag, 159-0: address
uint256 constant FEE_OFFSET = 161;
uint256 constant DIRECTION_FLAG =
0x0000000000000000000000010000000000000000000000000000000000000000;
function initialize(bytes calldata data) override external {
revert("METHOD NOT IMPLEMENTED");
}
function getKey() override external pure returns(bytes32) {
return keccak256(abi.encodePacked("UNISWAP_DIRECT_ROUTER", "2.0.0"));
}
function swapOnUniswapV2Fork(
address tokenIn,
uint256 amountIn,
uint256 amountOutMin,
address weth,
uint256[] calldata pools
)
external
payable
{
_swap(
tokenIn,
amountIn,
amountOutMin,
weth,
pools
);
}
function buyOnUniswapV2Fork(
address tokenIn,
uint256 amountInMax,
uint256 amountOut,
address weth,
uint256[] calldata pools
)
external
payable
{
_buy(
tokenIn,
amountInMax,
amountOut,
weth,
pools
);
}
function swapOnUniswapV2ForkWithPermit(
address tokenIn,
uint256 amountIn,
uint256 amountOutMin,
address weth,
uint256[] calldata pools,
bytes calldata permit
)
external
payable
{
_swapWithPermit(
tokenIn,
amountIn,
amountOutMin,
weth,
pools,
permit
);
}
function buyOnUniswapV2ForkWithPermit(
address tokenIn,
uint256 amountInMax,
uint256 amountOut,
address weth,
uint256[] calldata pools,
bytes calldata permit
)
external
payable
{
_buyWithPermit(
tokenIn,
amountInMax,
amountOut,
weth,
pools,
permit
);
}
function transferTokens(
address token,
address from,
address to,
uint256 amount
)
private
{
ITokenTransferProxy(tokenTransferProxy).transferFrom(
token, from, to, amount
);
}
function transferTokensWithPermit(
address token,
address from,
address to,
uint256 amount,
bytes calldata permit
)
private
{
Utils.permit(token, permit);
ITokenTransferProxy(tokenTransferProxy).transferFrom(
token, from, to, amount
);
}
function _swap(
address tokenIn,
uint256 amountIn,
uint256 amountOutMin,
address weth,
uint256[] memory pools
)
private
returns (uint256 tokensBought)
{
uint256 pairs = pools.length;
require(pairs != 0, "At least one pool required");
bool tokensBoughtEth;
if (tokenIn == ETH_IDENTIFIER) {
require(amountIn == msg.value, "Incorrect msg.value");
IWETH(weth).deposit{value: msg.value}();
require(IWETH(weth).transfer(address(pools[0]), msg.value));
} else {
require(msg.value == 0, "Incorrect msg.value");
transferTokens(tokenIn, msg.sender, address(pools[0]), amountIn);
tokensBoughtEth = weth != address(0);
}
tokensBought = amountIn;
for (uint256 i = 0; i < pairs; ++i) {
uint256 p = pools[i];
address pool = address(p);
bool direction = p & DIRECTION_FLAG == 0;
tokensBought = NewUniswapV2Lib.getAmountOut(
tokensBought, pool, direction, p >> FEE_OFFSET
);
(uint256 amount0Out, uint256 amount1Out) = direction
? (uint256(0), tokensBought) : (tokensBought, uint256(0));
IUniswapV2Pair(pool).swap(
amount0Out,
amount1Out,
i + 1 == pairs
? (tokensBoughtEth ? address(this) : msg.sender)
: address(pools[i + 1]),
""
);
}
if (tokensBoughtEth) {
IWETH(weth).withdraw(tokensBought);
TransferHelper.safeTransferETH(msg.sender, tokensBought);
}
require(tokensBought >= amountOutMin, "UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT");
}
function _buy(
address tokenIn,
uint256 amountInMax,
uint256 amountOut,
address weth,
uint256[] memory pools
)
private
returns (uint256 tokensSold)
{
uint256 pairs = pools.length;
require(pairs != 0, "At least one pool required");
uint256[] memory amounts = new uint256[](pairs + 1);
amounts[pairs] = amountOut;
for (uint256 i = pairs; i != 0; --i) {
uint256 p = pools[i - 1];
amounts[i - 1] = NewUniswapV2Lib.getAmountIn(
amounts[i],
address(p),
p & DIRECTION_FLAG == 0,
p >> FEE_OFFSET
);
}
tokensSold = amounts[0];
require(tokensSold <= amountInMax, "UniswapV2Router: INSUFFICIENT_INPUT_AMOUNT");
bool tokensBoughtEth;
if (tokenIn == ETH_IDENTIFIER) {
TransferHelper.safeTransferETH(
msg.sender, msg.value.sub(tokensSold)
);
IWETH(weth).deposit{value: tokensSold}();
require(IWETH(weth).transfer(address(pools[0]), tokensSold));
} else {
require(msg.value == 0, "Incorrect msg.value");
transferTokens(tokenIn, msg.sender, address(pools[0]), tokensSold);
tokensBoughtEth = weth != address(0);
}
for (uint256 i = 0; i < pairs; ++i) {
uint256 p = pools[i];
(uint256 amount0Out, uint256 amount1Out) = p & DIRECTION_FLAG == 0
? (uint256(0), amounts[i + 1]) : (amounts[i + 1], uint256(0));
IUniswapV2Pair(address(p)).swap(
amount0Out,
amount1Out,
i + 1 == pairs
? (tokensBoughtEth ? address(this) : msg.sender)
: address(pools[i + 1]),
""
);
}
if (tokensBoughtEth) {
IWETH(weth).withdraw(amountOut);
TransferHelper.safeTransferETH(msg.sender, amountOut);
}
}
function _swapWithPermit(
address tokenIn,
uint256 amountIn,
uint256 amountOutMin,
address weth,
uint256[] memory pools,
bytes calldata permit
)
private
returns (uint256 tokensBought)
{
uint256 pairs = pools.length;
require(pairs != 0, "At least one pool required");
bool tokensBoughtEth;
if (tokenIn == ETH_IDENTIFIER) {
require(amountIn == msg.value, "Incorrect msg.value");
IWETH(weth).deposit{value: msg.value}();
require(IWETH(weth).transfer(address(pools[0]), msg.value));
} else {
require(msg.value == 0, "Incorrect msg.value");
transferTokensWithPermit(tokenIn, msg.sender, address(pools[0]), amountIn, permit);
tokensBoughtEth = weth != address(0);
}
tokensBought = amountIn;
for (uint256 i = 0; i < pairs; ++i) {
uint256 p = pools[i];
address pool = address(p);
bool direction = p & DIRECTION_FLAG == 0;
tokensBought = NewUniswapV2Lib.getAmountOut(
tokensBought, pool, direction, p >> FEE_OFFSET
);
(uint256 amount0Out, uint256 amount1Out) = direction
? (uint256(0), tokensBought) : (tokensBought, uint256(0));
IUniswapV2Pair(pool).swap(
amount0Out,
amount1Out,
i + 1 == pairs
? (tokensBoughtEth ? address(this) : msg.sender)
: address(pools[i + 1]),
""
);
}
if (tokensBoughtEth) {
IWETH(weth).withdraw(tokensBought);
TransferHelper.safeTransferETH(msg.sender, tokensBought);
}
require(tokensBought >= amountOutMin, "UniswapV2Router: INSUFFICIENT_OUTPUT_AMOUNT");
}
function _buyWithPermit(
address tokenIn,
uint256 amountInMax,
uint256 amountOut,
address weth,
uint256[] memory pools,
bytes calldata permit
)
private
returns (uint256 tokensSold)
{
uint256 pairs = pools.length;
require(pairs != 0, "At least one pool required");
uint256[] memory amounts = new uint256[](pairs + 1);
amounts[pairs] = amountOut;
for (uint256 i = pairs; i != 0; --i) {
uint256 p = pools[i - 1];
amounts[i - 1] = NewUniswapV2Lib.getAmountIn(
amounts[i],
address(p),
p & DIRECTION_FLAG == 0,
p >> FEE_OFFSET
);
}
tokensSold = amounts[0];
require(tokensSold <= amountInMax, "UniswapV2Router: INSUFFICIENT_INPUT_AMOUNT");
bool tokensBoughtEth;
if (tokenIn == ETH_IDENTIFIER) {
TransferHelper.safeTransferETH(
msg.sender, msg.value.sub(tokensSold)
);
IWETH(weth).deposit{value: tokensSold}();
require(IWETH(weth).transfer(address(pools[0]), tokensSold));
} else {
require(msg.value == 0, "Incorrect msg.value");
transferTokensWithPermit(tokenIn, msg.sender, address(pools[0]), tokensSold, permit);
tokensBoughtEth = weth != address(0);
}
for (uint256 i = 0; i < pairs; ++i) {
uint256 p = pools[i];
(uint256 amount0Out, uint256 amount1Out) = p & DIRECTION_FLAG == 0
? (uint256(0), amounts[i + 1]) : (amounts[i + 1], uint256(0));
IUniswapV2Pair(address(p)).swap(
amount0Out,
amount1Out,
i + 1 == pairs
? (tokensBoughtEth ? address(this) : msg.sender)
: address(pools[i + 1]),
""
);
}
if (tokensBoughtEth) {
IWETH(weth).withdraw(amountOut);
TransferHelper.safeTransferETH(msg.sender, amountOut);
}
}
}{
"optimizer": {
"enabled": true,
"runs": 1000000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes16","name":"uuid","type":"bytes16"},{"indexed":false,"internalType":"address","name":"partner","type":"address"},{"indexed":false,"internalType":"uint256","name":"feePercent","type":"uint256"},{"indexed":false,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":true,"internalType":"address","name":"srcToken","type":"address"},{"indexed":true,"internalType":"address","name":"destToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"receivedAmount","type":"uint256"}],"name":"Bought2","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes16","name":"uuid","type":"bytes16"},{"indexed":false,"internalType":"address","name":"partner","type":"address"},{"indexed":false,"internalType":"uint256","name":"feePercent","type":"uint256"},{"indexed":false,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":true,"internalType":"address","name":"srcToken","type":"address"},{"indexed":true,"internalType":"address","name":"destToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"receivedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expectedAmount","type":"uint256"}],"name":"Swapped2","type":"event"},{"inputs":[],"name":"ROUTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELISTED_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address","name":"weth","type":"address"},{"internalType":"uint256[]","name":"pools","type":"uint256[]"}],"name":"buyOnUniswapV2Fork","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address","name":"weth","type":"address"},{"internalType":"uint256[]","name":"pools","type":"uint256[]"},{"internalType":"bytes","name":"permit","type":"bytes"}],"name":"buyOnUniswapV2ForkWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"weth","type":"address"},{"internalType":"uint256[]","name":"pools","type":"uint256[]"}],"name":"swapOnUniswapV2Fork","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"weth","type":"address"},{"internalType":"uint256[]","name":"pools","type":"uint256[]"},{"internalType":"bytes","name":"permit","type":"bytes"}],"name":"swapOnUniswapV2ForkWithPermit","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50612526806100206000396000f3fe60806040526004361061007b5760003560e01c80636e91538b1161004e5780636e91538b146100f35780637a3226ec1461010657806382678dd61461011b578063b2f1e6db146101305761007b565b80630b86a4c1146100805780632941a7121461009557806330d643b5146100a8578063439fab91146100d3575b600080fd5b61009361008e366004611db8565b610143565b005b6100936100a3366004611e2e565b61018c565b3480156100b457600080fd5b506100bd6101db565b6040516100ca919061208d565b60405180910390f35b3480156100df57600080fd5b506100936100ee366004611eef565b6101ff565b610093610101366004611e2e565b61023a565b34801561011257600080fd5b506100bd61027e565b34801561012757600080fd5b506100bd6102a2565b61009361013e366004611db8565b6102ce565b6101838686868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061030e92505050565b50505050505050565b6101d0888888888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a92508991506107329050565b505050505050505050565b7f7a05a596cb0ce7fdea8a1e1ec73be300bdb35097c944ce1897202f7a13122eb281565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612246565b60405180910390fd5b6101d0888888888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250899150610c629050565b7f8429d542926e6695b59ac6fbdcd9b37e8b1aeb757afab06ab60b1bb5878c3b4981565b60006040516020016102b390611fe1565b60405160208183030381529060405280519060200120905090565b6101838686868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061108a92505050565b80516000908061034a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b600073ffffffffffffffffffffffffffffffffffffffff881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156104c7573487146103b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b8473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156103ff57600080fd5b505af1158015610413573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8560008151811061044157fe5b6020026020010151346040518363ffffffff1660e01b8152600401610467929190612030565b602060405180830381600087803b15801561048157600080fd5b505af1158015610495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b99190611ecf565b6104c257600080fd5b61053a565b34156104ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b61051f88338660008151811061051157fe5b60200260200101518a611583565b5073ffffffffffffffffffffffffffffffffffffffff841615155b86925060005b8281101561065857600085828151811061055657fe5b60209081029190910101519050807401000000000000000000000000000000000000000081161561058d87838360a182901c611617565b96506000808261059f578860006105a3565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a600101146105eb578d8a600101815181106105de57fe5b60200260200101516105f8565b8a6105f657336105f8565b305b6040518463ffffffff1660e01b815260040161061693929190612485565b600060405180830381600087803b15801561063057600080fd5b505af1158015610644573d6000803e3d6000fd5b505050505050505050806001019050610540565b5080156106ed576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861690632e1a7d4d906106b190869060040161208d565b600060405180830381600087803b1580156106cb57600080fd5b505af11580156106df573d6000803e3d6000fd5b505050506106ed33846116b2565b85831015610727576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906123cb565b505095945050505050565b82516000908061076e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b60608160010167ffffffffffffffff8111801561078a57600080fd5b506040519080825280602002602001820160405280156107b4578160200160208202803683370190505b509050878183815181106107c457fe5b6020908102919091010152815b80156108715760008760018303815181106107e857fe5b6020026020010151905061082f83838151811061080157fe5b60200260200101518274010000000000000000000000000000000000000000841660001460a185901c61176b565b83600184038151811061083e57fe5b6020908102919091010152507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016107d1565b508060008151811061087f57fe5b60200260200101519250888311156108c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061227d565b600073ffffffffffffffffffffffffffffffffffffffff8b1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610a1a5761090a33610905348761183e565b6116b2565b8773ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561095257600080fd5b505af1158015610966573d6000803e3d6000fd5b50505050508773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8860008151811061099457fe5b6020026020010151866040518363ffffffff1660e01b81526004016109ba929190612030565b602060405180830381600087803b1580156109d457600080fd5b505af11580156109e8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0c9190611ecf565b610a1557600080fd5b610a8f565b3415610a52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b610a748b3389600081518110610a6457fe5b6020026020010151878a8a611889565b5073ffffffffffffffffffffffffffffffffffffffff871615155b60005b83811015610bbf576000888281518110610aa857fe5b60200260200101519050600080740100000000000000000000000000000000000000008316600014610af257858460010181518110610ae357fe5b60200260200101516000610b0c565b6000868560010181518110610b0357fe5b60200260200101515b915091508273ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838a8860010114610b54578e8860010181518110610b4757fe5b6020026020010151610b61565b88610b5f5733610b61565b305b6040518463ffffffff1660e01b8152600401610b7f93929190612485565b600060405180830381600087803b158015610b9957600080fd5b505af1158015610bad573d6000803e3d6000fd5b50505050505050806001019050610a92565b508015610c54576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff891690632e1a7d4d90610c18908c9060040161208d565b600060405180830381600087803b158015610c3257600080fd5b505af1158015610c46573d6000803e3d6000fd5b50505050610c54338a6116b2565b505050979650505050505050565b825160009080610c9e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b600073ffffffffffffffffffffffffffffffffffffffff8a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610e1b57348914610d0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b8673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d5357600080fd5b505af1158015610d67573d6000803e3d6000fd5b50505050508673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87600081518110610d9557fe5b6020026020010151346040518363ffffffff1660e01b8152600401610dbb929190612030565b602060405180830381600087803b158015610dd557600080fd5b505af1158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190611ecf565b610e1657600080fd5b610e90565b3415610e53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b610e758a3388600081518110610e6557fe5b60200260200101518c8989611889565b5073ffffffffffffffffffffffffffffffffffffffff861615155b88925060005b82811015610fae576000878281518110610eac57fe5b602090810291909101015190508074010000000000000000000000000000000000000000811615610ee387838360a182901c611617565b965060008082610ef557886000610ef9565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a60010114610f41578f8a60010181518110610f3457fe5b6020026020010151610f4e565b8a610f4c5733610f4e565b305b6040518463ffffffff1660e01b8152600401610f6c93929190612485565b600060405180830381600087803b158015610f8657600080fd5b505af1158015610f9a573d6000803e3d6000fd5b505050505050505050806001019050610e96565b508015611043576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881690632e1a7d4d9061100790869060040161208d565b600060405180830381600087803b15801561102157600080fd5b505af1158015611035573d6000803e3d6000fd5b5050505061104333846116b2565b8783101561107d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906123cb565b5050979650505050505050565b8051600090806110c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b60608160010167ffffffffffffffff811180156110e257600080fd5b5060405190808252806020026020018201604052801561110c578160200160208202803683370190505b5090508581838151811061111c57fe5b6020908102919091010152815b801561119b57600085600183038151811061114057fe5b6020026020010151905061115983838151811061080157fe5b83600184038151811061116857fe5b6020908102919091010152507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01611129565b50806000815181106111a957fe5b60200260200101519250868311156111ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061227d565b600073ffffffffffffffffffffffffffffffffffffffff891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561133f5761122f33610905348761183e565b8573ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561127757600080fd5b505af115801561128b573d6000803e3d6000fd5b50505050508573ffffffffffffffffffffffffffffffffffffffff1663a9059cbb866000815181106112b957fe5b6020026020010151866040518363ffffffff1660e01b81526004016112df929190612030565b602060405180830381600087803b1580156112f957600080fd5b505af115801561130d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113319190611ecf565b61133a57600080fd5b6113b2565b3415611377576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b61139789338760008151811061138957fe5b602002602001015187611583565b5073ffffffffffffffffffffffffffffffffffffffff851615155b60005b838110156114e25760008682815181106113cb57fe5b602002602001015190506000807401000000000000000000000000000000000000000083166000146114155785846001018151811061140657fe5b6020026020010151600061142f565b600086856001018151811061142657fe5b60200260200101515b915091508273ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838a8860010114611477578c886001018151811061146a57fe5b6020026020010151611484565b886114825733611484565b305b6040518463ffffffff1660e01b81526004016114a293929190612485565b600060405180830381600087803b1580156114bc57600080fd5b505af11580156114d0573d6000803e3d6000fd5b505050505050508060010190506113b5565b508015611577576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690632e1a7d4d9061153b908a9060040161208d565b600060405180830381600087803b15801561155557600080fd5b505af1158015611569573d6000803e3d6000fd5b5050505061157733886116b2565b50505095945050505050565b6000546040517f15dacbea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906315dacbea906115df908790879087908790600401612056565b600060405180830381600087803b1580156115f957600080fd5b505af115801561160d573d6000803e3d6000fd5b5050505050505050565b6000808511611652576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906120e7565b60008061165f868661195f565b909250905060006116708886611a24565b9050600061167e8284611a24565b905060006116988361169287612710611a24565b90611a78565b90508082816116a357fe5b049a9950505050505050505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516116e99190611fc5565b60006040518083038185875af1925050503d8060008114611726576040519150601f19603f3d011682016040523d82523d6000602084013e61172b565b606091505b5050905080611766576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061236e565b505050565b60008085116117a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612428565b6000806117b3868661195f565b915091508681116117f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061217b565b6000611808612710611802858b611a24565b90611a24565b9050600061181a86611802858c61183e565b9050611831600182848161182a57fe5b0490611a78565b9998505050505050505050565b600061188083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ab7565b90505b92915050565b6118c98683838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611afd92505050565b6000546040517f15dacbea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906315dacbea90611925908990899089908990600401612056565b600060405180830381600087803b15801561193f57600080fd5b505af1158015611953573d6000803e3d6000fd5b50505050505050505050565b6000806000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156119ab57600080fd5b505afa1580156119bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e39190611f2f565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915084611a14578082611a17565b81815b9097909650945050505050565b600082611a3357506000611883565b82820282848281611a4057fe5b0414611880576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906122da565b600082820183811015611880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612144565b60008184841115611af5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319190612096565b505050900390565b805160e01415611bf15760008273ffffffffffffffffffffffffffffffffffffffff1663d505accf60e01b83604051602001611b3a929190611f7d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611b7291611fc5565b6000604051808303816000865af19150503d8060008114611baf576040519150601f19603f3d011682016040523d82523d6000602084013e611bb4565b606091505b5050905080611bef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906121d8565b505b80516101001415611ce45760008273ffffffffffffffffffffffffffffffffffffffff16638fcbaf0c60e01b83604051602001611c2f929190611f7d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611c6791611fc5565b6000604051808303816000865af19150503d8060008114611ca4576040519150601f19603f3d011682016040523d82523d6000602084013e611ca9565b606091505b5050905080611766576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906121d8565b5050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611d0c57600080fd5b919050565b60008083601f840112611d22578182fd5b50813567ffffffffffffffff811115611d39578182fd5b6020830191508360208083028501011115611d5357600080fd5b9250929050565b60008083601f840112611d6b578182fd5b50813567ffffffffffffffff811115611d82578182fd5b602083019150836020828501011115611d5357600080fd5b80516dffffffffffffffffffffffffffff81168114611d0c57600080fd5b60008060008060008060a08789031215611dd0578182fd5b611dd987611ce8565b95506020870135945060408701359350611df560608801611ce8565b9250608087013567ffffffffffffffff811115611e10578283fd5b611e1c89828a01611d11565b979a9699509497509295939492505050565b60008060008060008060008060c0898b031215611e49578182fd5b611e5289611ce8565b97506020890135965060408901359550611e6e60608a01611ce8565b9450608089013567ffffffffffffffff80821115611e8a578384fd5b611e968c838d01611d11565b909650945060a08b0135915080821115611eae578384fd5b50611ebb8b828c01611d5a565b999c989b5096995094979396929594505050565b600060208284031215611ee0578081fd5b81518015158114611880578182fd5b60008060208385031215611f01578182fd5b823567ffffffffffffffff811115611f17578283fd5b611f2385828601611d5a565b90969095509350505050565b600080600060608486031215611f43578283fd5b611f4c84611d9a565b9250611f5a60208501611d9a565b9150604084015163ffffffff81168114611f72578182fd5b809150509250925092565b60007fffffffff00000000000000000000000000000000000000000000000000000000841682528251611fb78160048501602087016124c0565b919091016004019392505050565b60008251611fd78184602087016124c0565b9190910192915050565b7f554e49535741505f4449524543545f524f55544552000000000000000000000081527f322e302e300000000000000000000000000000000000000000000000000000006015820152601a0190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9485168152928416602084015292166040820152606081019190915260800190565b90815260200190565b60006020825282518060208401526120b58160408501602087016124c0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526027908201527f556e697377617056324c69623a20494e53554646494349454e545f494e50555460408201527f5f414d4f554e5400000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526039908201527f556e697377617056324c69623a20726573657276654f75742073686f756c642060408201527f62652067726561746572207468616e20616d6f756e744f757400000000000000606082015260800190565b6020808252600d908201527f5065726d6974206661696c656400000000000000000000000000000000000000604082015260600190565b6020808252601a908201527f4174206c65617374206f6e6520706f6f6c207265717569726564000000000000604082015260600190565b60208082526016908201527f4d4554484f44204e4f5420494d504c454d454e54454400000000000000000000604082015260600190565b6020808252602a908201527f556e69737761705632526f757465723a20494e53554646494349454e545f494e60408201527f5055545f414d4f554e5400000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526013908201527f496e636f7272656374206d73672e76616c756500000000000000000000000000604082015260600190565b60208082526023908201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960408201527f4c45440000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f556e69737761705632526f757465723a20494e53554646494349454e545f4f5560408201527f545055545f414d4f554e54000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f556e697377617056324c69623a20494e53554646494349454e545f4f5554505560408201527f545f414d4f554e54000000000000000000000000000000000000000000000000606082015260800190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260806060820181905260009082015260a00190565b60005b838110156124db5781810151838201526020016124c3565b838111156124ea576000848401525b5050505056fea2646970667358221220d7a29e983270bf0dc7bdf777a7850b341fcdd105012ffdba61dfee523cd841b364736f6c63430007050033
Deployed Bytecode
0x60806040526004361061007b5760003560e01c80636e91538b1161004e5780636e91538b146100f35780637a3226ec1461010657806382678dd61461011b578063b2f1e6db146101305761007b565b80630b86a4c1146100805780632941a7121461009557806330d643b5146100a8578063439fab91146100d3575b600080fd5b61009361008e366004611db8565b610143565b005b6100936100a3366004611e2e565b61018c565b3480156100b457600080fd5b506100bd6101db565b6040516100ca919061208d565b60405180910390f35b3480156100df57600080fd5b506100936100ee366004611eef565b6101ff565b610093610101366004611e2e565b61023a565b34801561011257600080fd5b506100bd61027e565b34801561012757600080fd5b506100bd6102a2565b61009361013e366004611db8565b6102ce565b6101838686868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061030e92505050565b50505050505050565b6101d0888888888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a92508991506107329050565b505050505050505050565b7f7a05a596cb0ce7fdea8a1e1ec73be300bdb35097c944ce1897202f7a13122eb281565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612246565b60405180910390fd5b6101d0888888888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250899150610c629050565b7f8429d542926e6695b59ac6fbdcd9b37e8b1aeb757afab06ab60b1bb5878c3b4981565b60006040516020016102b390611fe1565b60405160208183030381529060405280519060200120905090565b6101838686868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061108a92505050565b80516000908061034a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b600073ffffffffffffffffffffffffffffffffffffffff881673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156104c7573487146103b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b8473ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156103ff57600080fd5b505af1158015610413573d6000803e3d6000fd5b50505050508473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8560008151811061044157fe5b6020026020010151346040518363ffffffff1660e01b8152600401610467929190612030565b602060405180830381600087803b15801561048157600080fd5b505af1158015610495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b99190611ecf565b6104c257600080fd5b61053a565b34156104ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b61051f88338660008151811061051157fe5b60200260200101518a611583565b5073ffffffffffffffffffffffffffffffffffffffff841615155b86925060005b8281101561065857600085828151811061055657fe5b60209081029190910101519050807401000000000000000000000000000000000000000081161561058d87838360a182901c611617565b96506000808261059f578860006105a3565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a600101146105eb578d8a600101815181106105de57fe5b60200260200101516105f8565b8a6105f657336105f8565b305b6040518463ffffffff1660e01b815260040161061693929190612485565b600060405180830381600087803b15801561063057600080fd5b505af1158015610644573d6000803e3d6000fd5b505050505050505050806001019050610540565b5080156106ed576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff861690632e1a7d4d906106b190869060040161208d565b600060405180830381600087803b1580156106cb57600080fd5b505af11580156106df573d6000803e3d6000fd5b505050506106ed33846116b2565b85831015610727576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906123cb565b505095945050505050565b82516000908061076e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b60608160010167ffffffffffffffff8111801561078a57600080fd5b506040519080825280602002602001820160405280156107b4578160200160208202803683370190505b509050878183815181106107c457fe5b6020908102919091010152815b80156108715760008760018303815181106107e857fe5b6020026020010151905061082f83838151811061080157fe5b60200260200101518274010000000000000000000000000000000000000000841660001460a185901c61176b565b83600184038151811061083e57fe5b6020908102919091010152507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016107d1565b508060008151811061087f57fe5b60200260200101519250888311156108c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061227d565b600073ffffffffffffffffffffffffffffffffffffffff8b1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610a1a5761090a33610905348761183e565b6116b2565b8773ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561095257600080fd5b505af1158015610966573d6000803e3d6000fd5b50505050508773ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8860008151811061099457fe5b6020026020010151866040518363ffffffff1660e01b81526004016109ba929190612030565b602060405180830381600087803b1580156109d457600080fd5b505af11580156109e8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0c9190611ecf565b610a1557600080fd5b610a8f565b3415610a52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b610a748b3389600081518110610a6457fe5b6020026020010151878a8a611889565b5073ffffffffffffffffffffffffffffffffffffffff871615155b60005b83811015610bbf576000888281518110610aa857fe5b60200260200101519050600080740100000000000000000000000000000000000000008316600014610af257858460010181518110610ae357fe5b60200260200101516000610b0c565b6000868560010181518110610b0357fe5b60200260200101515b915091508273ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838a8860010114610b54578e8860010181518110610b4757fe5b6020026020010151610b61565b88610b5f5733610b61565b305b6040518463ffffffff1660e01b8152600401610b7f93929190612485565b600060405180830381600087803b158015610b9957600080fd5b505af1158015610bad573d6000803e3d6000fd5b50505050505050806001019050610a92565b508015610c54576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff891690632e1a7d4d90610c18908c9060040161208d565b600060405180830381600087803b158015610c3257600080fd5b505af1158015610c46573d6000803e3d6000fd5b50505050610c54338a6116b2565b505050979650505050505050565b825160009080610c9e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b600073ffffffffffffffffffffffffffffffffffffffff8a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610e1b57348914610d0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b8673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d5357600080fd5b505af1158015610d67573d6000803e3d6000fd5b50505050508673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87600081518110610d9557fe5b6020026020010151346040518363ffffffff1660e01b8152600401610dbb929190612030565b602060405180830381600087803b158015610dd557600080fd5b505af1158015610de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0d9190611ecf565b610e1657600080fd5b610e90565b3415610e53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b610e758a3388600081518110610e6557fe5b60200260200101518c8989611889565b5073ffffffffffffffffffffffffffffffffffffffff861615155b88925060005b82811015610fae576000878281518110610eac57fe5b602090810291909101015190508074010000000000000000000000000000000000000000811615610ee387838360a182901c611617565b965060008082610ef557886000610ef9565b6000895b915091508373ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838b8a60010114610f41578f8a60010181518110610f3457fe5b6020026020010151610f4e565b8a610f4c5733610f4e565b305b6040518463ffffffff1660e01b8152600401610f6c93929190612485565b600060405180830381600087803b158015610f8657600080fd5b505af1158015610f9a573d6000803e3d6000fd5b505050505050505050806001019050610e96565b508015611043576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff881690632e1a7d4d9061100790869060040161208d565b600060405180830381600087803b15801561102157600080fd5b505af1158015611035573d6000803e3d6000fd5b5050505061104333846116b2565b8783101561107d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906123cb565b5050979650505050505050565b8051600090806110c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061220f565b60608160010167ffffffffffffffff811180156110e257600080fd5b5060405190808252806020026020018201604052801561110c578160200160208202803683370190505b5090508581838151811061111c57fe5b6020908102919091010152815b801561119b57600085600183038151811061114057fe5b6020026020010151905061115983838151811061080157fe5b83600184038151811061116857fe5b6020908102919091010152507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01611129565b50806000815181106111a957fe5b60200260200101519250868311156111ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061227d565b600073ffffffffffffffffffffffffffffffffffffffff891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561133f5761122f33610905348761183e565b8573ffffffffffffffffffffffffffffffffffffffff1663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b15801561127757600080fd5b505af115801561128b573d6000803e3d6000fd5b50505050508573ffffffffffffffffffffffffffffffffffffffff1663a9059cbb866000815181106112b957fe5b6020026020010151866040518363ffffffff1660e01b81526004016112df929190612030565b602060405180830381600087803b1580156112f957600080fd5b505af115801561130d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113319190611ecf565b61133a57600080fd5b6113b2565b3415611377576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612337565b61139789338760008151811061138957fe5b602002602001015187611583565b5073ffffffffffffffffffffffffffffffffffffffff851615155b60005b838110156114e25760008682815181106113cb57fe5b602002602001015190506000807401000000000000000000000000000000000000000083166000146114155785846001018151811061140657fe5b6020026020010151600061142f565b600086856001018151811061142657fe5b60200260200101515b915091508273ffffffffffffffffffffffffffffffffffffffff1663022c0d9f83838a8860010114611477578c886001018151811061146a57fe5b6020026020010151611484565b886114825733611484565b305b6040518463ffffffff1660e01b81526004016114a293929190612485565b600060405180830381600087803b1580156114bc57600080fd5b505af11580156114d0573d6000803e3d6000fd5b505050505050508060010190506113b5565b508015611577576040517f2e1a7d4d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871690632e1a7d4d9061153b908a9060040161208d565b600060405180830381600087803b15801561155557600080fd5b505af1158015611569573d6000803e3d6000fd5b5050505061157733886116b2565b50505095945050505050565b6000546040517f15dacbea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906315dacbea906115df908790879087908790600401612056565b600060405180830381600087803b1580156115f957600080fd5b505af115801561160d573d6000803e3d6000fd5b5050505050505050565b6000808511611652576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906120e7565b60008061165f868661195f565b909250905060006116708886611a24565b9050600061167e8284611a24565b905060006116988361169287612710611a24565b90611a78565b90508082816116a357fe5b049a9950505050505050505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff84169083906040516116e99190611fc5565b60006040518083038185875af1925050503d8060008114611726576040519150601f19603f3d011682016040523d82523d6000602084013e61172b565b606091505b5050905080611766576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061236e565b505050565b60008085116117a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612428565b6000806117b3868661195f565b915091508681116117f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319061217b565b6000611808612710611802858b611a24565b90611a24565b9050600061181a86611802858c61183e565b9050611831600182848161182a57fe5b0490611a78565b9998505050505050505050565b600061188083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ab7565b90505b92915050565b6118c98683838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611afd92505050565b6000546040517f15dacbea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906315dacbea90611925908990899089908990600401612056565b600060405180830381600087803b15801561193f57600080fd5b505af1158015611953573d6000803e3d6000fd5b50505050505050505050565b6000806000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156119ab57600080fd5b505afa1580156119bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e39190611f2f565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915084611a14578082611a17565b81815b9097909650945050505050565b600082611a3357506000611883565b82820282848281611a4057fe5b0414611880576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906122da565b600082820183811015611880576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023190612144565b60008184841115611af5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102319190612096565b505050900390565b805160e01415611bf15760008273ffffffffffffffffffffffffffffffffffffffff1663d505accf60e01b83604051602001611b3a929190611f7d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611b7291611fc5565b6000604051808303816000865af19150503d8060008114611baf576040519150601f19603f3d011682016040523d82523d6000602084013e611bb4565b606091505b5050905080611bef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906121d8565b505b80516101001415611ce45760008273ffffffffffffffffffffffffffffffffffffffff16638fcbaf0c60e01b83604051602001611c2f929190611f7d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815290829052611c6791611fc5565b6000604051808303816000865af19150503d8060008114611ca4576040519150601f19603f3d011682016040523d82523d6000602084013e611ca9565b606091505b5050905080611766576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610231906121d8565b5050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611d0c57600080fd5b919050565b60008083601f840112611d22578182fd5b50813567ffffffffffffffff811115611d39578182fd5b6020830191508360208083028501011115611d5357600080fd5b9250929050565b60008083601f840112611d6b578182fd5b50813567ffffffffffffffff811115611d82578182fd5b602083019150836020828501011115611d5357600080fd5b80516dffffffffffffffffffffffffffff81168114611d0c57600080fd5b60008060008060008060a08789031215611dd0578182fd5b611dd987611ce8565b95506020870135945060408701359350611df560608801611ce8565b9250608087013567ffffffffffffffff811115611e10578283fd5b611e1c89828a01611d11565b979a9699509497509295939492505050565b60008060008060008060008060c0898b031215611e49578182fd5b611e5289611ce8565b97506020890135965060408901359550611e6e60608a01611ce8565b9450608089013567ffffffffffffffff80821115611e8a578384fd5b611e968c838d01611d11565b909650945060a08b0135915080821115611eae578384fd5b50611ebb8b828c01611d5a565b999c989b5096995094979396929594505050565b600060208284031215611ee0578081fd5b81518015158114611880578182fd5b60008060208385031215611f01578182fd5b823567ffffffffffffffff811115611f17578283fd5b611f2385828601611d5a565b90969095509350505050565b600080600060608486031215611f43578283fd5b611f4c84611d9a565b9250611f5a60208501611d9a565b9150604084015163ffffffff81168114611f72578182fd5b809150509250925092565b60007fffffffff00000000000000000000000000000000000000000000000000000000841682528251611fb78160048501602087016124c0565b919091016004019392505050565b60008251611fd78184602087016124c0565b9190910192915050565b7f554e49535741505f4449524543545f524f55544552000000000000000000000081527f322e302e300000000000000000000000000000000000000000000000000000006015820152601a0190565b73ffffffffffffffffffffffffffffffffffffffff929092168252602082015260400190565b73ffffffffffffffffffffffffffffffffffffffff9485168152928416602084015292166040820152606081019190915260800190565b90815260200190565b60006020825282518060208401526120b58160408501602087016124c0565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60208082526027908201527f556e697377617056324c69623a20494e53554646494349454e545f494e50555460408201527f5f414d4f554e5400000000000000000000000000000000000000000000000000606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526039908201527f556e697377617056324c69623a20726573657276654f75742073686f756c642060408201527f62652067726561746572207468616e20616d6f756e744f757400000000000000606082015260800190565b6020808252600d908201527f5065726d6974206661696c656400000000000000000000000000000000000000604082015260600190565b6020808252601a908201527f4174206c65617374206f6e6520706f6f6c207265717569726564000000000000604082015260600190565b60208082526016908201527f4d4554484f44204e4f5420494d504c454d454e54454400000000000000000000604082015260600190565b6020808252602a908201527f556e69737761705632526f757465723a20494e53554646494349454e545f494e60408201527f5055545f414d4f554e5400000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60408201527f7700000000000000000000000000000000000000000000000000000000000000606082015260800190565b60208082526013908201527f496e636f7272656374206d73672e76616c756500000000000000000000000000604082015260600190565b60208082526023908201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960408201527f4c45440000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f556e69737761705632526f757465723a20494e53554646494349454e545f4f5560408201527f545055545f414d4f554e54000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f556e697377617056324c69623a20494e53554646494349454e545f4f5554505560408201527f545f414d4f554e54000000000000000000000000000000000000000000000000606082015260800190565b928352602083019190915273ffffffffffffffffffffffffffffffffffffffff16604082015260806060820181905260009082015260a00190565b60005b838110156124db5781810151838201526020016124c3565b838111156124ea576000848401525b5050505056fea2646970667358221220d7a29e983270bf0dc7bdf777a7850b341fcdd105012ffdba61dfee523cd841b364736f6c63430007050033
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 ]
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.