The Gnosis Chain (formerly xDai Chain) journey begins! STAKE to GNO swap application now live on Ethereum and Gnosis Chain. Swap now. Learn about the benefits of GNO token.

Contract Address Details
contract

0xA369a0b81ee984a470EA0acf41EF9DdcDB5f7B46

Contract Name
GnosisProtocolRelayer
Creator
0x40035b–8e2b55 at 0x8bef1d–efc6db
Balance
0 xDAI ( )
Tokens
Fetching tokens...
Transactions
342 Transactions
Transfers
200 Transfers
Gas Used
51,112,670
Last Balance Update
20163197
Contract name:
GnosisProtocolRelayer




Optimization enabled
true
Compiler version
v0.6.6+commit.6c089d02




Optimization runs
200
EVM Version
default




Verified at
2021-05-14 15:24:15.090723Z

Constructor Arguments

00000000000000000000000040035b9144bac13a0ca93003526f77df3a8e2b5500000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631300000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631300000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d0000000000000000000000009a483a344cdd20f55f5d60998bb67245d99a951d00000000000000000000000000000000000000000000000000000000000000030000000000000000000000005d48c95adffd4b40c1aaadc4e08fc44117e02179000000000000000000000000a818b4f111ccac7aa31d0bcc0806d64f2e0737d700000000000000000000000045de240fbe2077dd3e711299538a09854fae9c9b
              

Contract source code

// File: 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,
uint256 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,
uint256 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,
uint256 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, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, "TransferHelper: ETH_TRANSFER_FAILED");
}
}
// File: contracts/libraries/SafeMath.sol
pragma solidity =0.6.6;
// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)
library SafeMath {
function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
require((z = x + y) >= x, "ds-math-add-overflow");
}
function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
require((z = x - y) <= x, "ds-math-sub-underflow");
}
function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
require(y == 0 || (z = x * y) / y == x, "ds-math-mul-overflow");
}
}
// File: dxswap-core/contracts/interfaces/IDXswapPair.sol
pragma solidity >=0.5.0;
interface IDXswapPair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function swapFee() external view returns (uint32);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
function setSwapFee(uint32) external;
}
// File: contracts/libraries/DXswapLibrary.sol
pragma solidity >=0.5.0;
library DXswapLibrary {
using SafeMath for uint256;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, "DXswapLibrary: IDENTICAL_ADDRESSES");
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), "DXswapLibrary: ZERO_ADDRESS");
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(
address factory,
address tokenA,
address tokenB
) internal pure returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(
uint256(
keccak256(
abi.encodePacked(
hex"ff",
factory,
keccak256(abi.encodePacked(token0, token1)),
hex"2db943b381c6ef706828ea5e89f480bd449d4d3a2b98e6da97b30d0eb41fb6d6" // init code hash
)
)
)
);
}
// fetches and sorts the reserves for a pair
function getReserves(
address factory,
address tokenA,
address tokenB
) internal view returns (uint256 reserveA, uint256 reserveB) {
(address token0, ) = sortTokens(tokenA, tokenB);
(uint256 reserve0, uint256 reserve1, ) = IDXswapPair(pairFor(factory, tokenA, tokenB)).getReserves();
(reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
}
// fetches and sorts the reserves for a pair
function getSwapFee(
address factory,
address tokenA,
address tokenB
) internal view returns (uint256 swapFee) {
(address token0, ) = sortTokens(tokenA, tokenB);
swapFee = IDXswapPair(pairFor(factory, tokenA, tokenB)).swapFee();
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) internal pure returns (uint256 amountB) {
require(amountA > 0, "DXswapLibrary: INSUFFICIENT_AMOUNT");
require(reserveA > 0 && reserveB > 0, "DXswapLibrary: INSUFFICIENT_LIQUIDITY");
amountB = amountA.mul(reserveB) / reserveA;
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut,
uint256 swapFee
) internal pure returns (uint256 amountOut) {
require(amountIn > 0, "DXswapLibrary: INSUFFICIENT_INPUT_AMOUNT");
require(reserveIn > 0 && reserveOut > 0, "DXswapLibrary: INSUFFICIENT_LIQUIDITY");
uint256 amountInWithFee = amountIn.mul(uint256(10000).sub(swapFee));
uint256 numerator = amountInWithFee.mul(reserveOut);
uint256 denominator = reserveIn.mul(10000).add(amountInWithFee);
amountOut = numerator / denominator;
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut,
uint256 swapFee
) internal pure returns (uint256 amountIn) {
require(amountOut > 0, "DXswapLibrary: INSUFFICIENT_OUTPUT_AMOUNT");
require(reserveIn > 0 && reserveOut > 0, "DXswapLibrary: INSUFFICIENT_LIQUIDITY");
uint256 numerator = reserveIn.mul(amountOut).mul(10000);
uint256 denominator = reserveOut.sub(amountOut).mul(uint256(10000).sub(swapFee));
amountIn = (numerator / denominator).add(1);
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(
address factory,
uint256 amountIn,
address[] memory path
) internal view returns (uint256[] memory amounts) {
require(path.length >= 2, "DXswapLibrary: INVALID_PATH");
amounts = new uint256[](path.length);
amounts[0] = amountIn;
for (uint256 i; i < path.length - 1; i++) {
(uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i], path[i + 1]);
amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut, getSwapFee(factory, path[i], path[i + 1]));
}
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(
address factory,
uint256 amountOut,
address[] memory path
) internal view returns (uint256[] memory amounts) {
require(path.length >= 2, "DXswapLibrary: INVALID_PATH");
amounts = new uint256[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint256 i = path.length - 1; i > 0; i--) {
(uint256 reserveIn, uint256 reserveOut) = getReserves(factory, path[i - 1], path[i]);
amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut, getSwapFee(factory, path[i - 1], path[i]));
}
}
}
// File: contracts/interfaces/IDXswapFactory.sol
pragma solidity >=0.5.0;
interface IDXswapFactory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint256);
function INIT_CODE_PAIR_HASH() external pure returns (bytes32);
function feeTo() external view returns (address);
function protocolFeeDenominator() external view returns (uint8);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
function setProtocolFee(uint8 _protocolFee) external;
function setSwapFee(address pair, uint32 swapFee) external;
}
// File: contracts/interfaces/IERC20.sol
pragma solidity >=0.5.0;
interface IERC20 {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
}
// File: contracts/interfaces/IWETH.sol
pragma solidity >=0.5.0;
interface IWETH {
function deposit() external payable;
function transfer(address to, uint256 value) external returns (bool);
function withdraw(uint256) external;
function balanceOf(address guy) external returns (uint256);
function approve(address guy, uint256 wad) external returns (bool);
}
// File: contracts/interfaces/IBatchExchange.sol
pragma solidity >=0.5.0;
interface IBatchExchange {
function tokenAddressToIdMap(address addr) external view returns (uint16);
function tokenIdToAddressMap(uint16 id) external view returns (address);
function hasToken(address addr) external view returns (bool);
function placeOrder(
uint16 buyToken,
uint16 sellToken,
uint32 validUntil,
uint128 buyAmount,
uint128 sellAmount
) external returns (uint256);
function placeValidFromOrders(
uint16[] calldata buyTokens,
uint16[] calldata sellTokens,
uint32[] calldata validFroms,
uint32[] calldata validUntils,
uint128[] calldata buyAmounts,
uint128[] calldata sellAmounts
) external returns (uint16[] memory orderIds);
function cancelOrders(uint16[] calldata orderIds) external;
}
// File: contracts/interfaces/IEpochTokenLocker.sol
pragma solidity >=0.5.0;
interface IEpochTokenLocker {
function deposit(address token, uint256 amount) external;
function withdraw(address user, address token) external;
function getCurrentBatchId() external view returns (uint32);
function requestWithdraw(address token, uint256 amount) external;
function BATCH_TIME() external view returns (uint32);
}
// File: contracts/libraries/FixedPoint.sol
pragma solidity >=0.5.0;
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
// range: [0, 2**112 - 1]
// resolution: 1 / 2**112
struct uq112x112 {
uint224 _x;
}
// range: [0, 2**144 - 1]
// resolution: 1 / 2**112
struct uq144x112 {
uint256 _x;
}
uint8 private constant RESOLUTION = 112;
// encode a uint112 as a UQ112x112
function encode(uint112 x) internal pure returns (uq112x112 memory) {
return uq112x112(uint224(x) << RESOLUTION);
}
// encodes a uint144 as a UQ144x112
function encode144(uint144 x) internal pure returns (uq144x112 memory) {
return uq144x112(uint256(x) << RESOLUTION);
}
// divide a UQ112x112 by a uint112, returning a UQ112x112
function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) {
require(x != 0, "FixedPoint: DIV_BY_ZERO");
return uq112x112(self._x / uint224(x));
}
// multiply a UQ112x112 by a uint, returning a UQ144x112
// reverts on overflow
function mul(uq112x112 memory self, uint256 y) internal pure returns (uq144x112 memory) {
uint256 z;
require(y == 0 || (z = uint256(self._x) * y) / y == uint256(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW");
return uq144x112(z);
}
// returns a UQ112x112 which represents the ratio of the numerator to the denominator
// equivalent to encode(numerator).div(denominator)
function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) {
require(denominator > 0, "FixedPoint: DIV_BY_ZERO");
return uq112x112((uint224(numerator) << RESOLUTION) / denominator);
}
// decode a UQ112x112 into a uint112 by truncating after the radix point
function decode(uq112x112 memory self) internal pure returns (uint112) {
return uint112(self._x >> RESOLUTION);
}
// decode a UQ144x112 into a uint144 by truncating after the radix point
function decode144(uq144x112 memory self) internal pure returns (uint144) {
return uint144(self._x >> RESOLUTION);
}
}
// File: contracts/libraries/DXswapOracleLibrary.sol
pragma solidity >=0.5.0;
// library with helper methods for oracles that are concerned with computing average prices
library DXswapOracleLibrary {
using FixedPoint for *;
// helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
function currentBlockTimestamp() internal view returns (uint32) {
return uint32(block.timestamp % 2**32);
}
// produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
function currentCumulativePrices(address pair)
internal
view
returns (
uint256 price0Cumulative,
uint256 price1Cumulative,
uint32 blockTimestamp
)
{
blockTimestamp = currentBlockTimestamp();
price0Cumulative = IDXswapPair(pair).price0CumulativeLast();
price1Cumulative = IDXswapPair(pair).price1CumulativeLast();
// if time has elapsed since the last update on the pair, mock the accumulated price values
(uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IDXswapPair(pair).getReserves();
if (blockTimestampLast != blockTimestamp) {
// subtraction overflow is desired
uint32 timeElapsed = blockTimestamp - blockTimestampLast;
// addition overflow is desired
// counterfactual
price0Cumulative += uint256(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
// counterfactual
price1Cumulative += uint256(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
}
}
}
// File: contracts/OracleCreator.sol
pragma solidity =0.6.6;
contract OracleCreator {
using FixedPoint for *;
using SafeMath for uint256;
event OracleCreated(
uint256 indexed _oracleIndex,
address indexed _pair,
uint256 _windowTime
);
struct Oracle{
uint256 windowTime;
address token0;
address token1;
IDXswapPair pair;
uint32 blockTimestampLast;
uint256 price0CumulativeLast;
uint256 price1CumulativeLast;
FixedPoint.uq112x112 price0Average;
FixedPoint.uq112x112 price1Average;
uint256 observationsCount;
address owner;
}
mapping(uint256 => Oracle) public oracles;
uint256 public oraclesIndex;
function createOracle(
uint256 windowTime,
address pair
) public returns (uint256 oracleId) {
IDXswapPair sourcePair = IDXswapPair(pair);
address token0 = sourcePair.token0();
address token1 = sourcePair.token1();
(,, uint32 blockTimestampLast) = sourcePair.getReserves();
oracles[oraclesIndex] = Oracle({
windowTime: windowTime,
token0: token0,
token1: token1,
pair: sourcePair,
blockTimestampLast: blockTimestampLast,
price0CumulativeLast: sourcePair.price0CumulativeLast(),
price1CumulativeLast: sourcePair.price1CumulativeLast(),
price0Average: FixedPoint.uq112x112(0),
price1Average: FixedPoint.uq112x112(0),
observationsCount: 0,
owner: msg.sender
});
oracleId = oraclesIndex;
oraclesIndex++;
emit OracleCreated(oracleId, address(sourcePair), windowTime);
}
function update(uint256 oracleIndex) public {
Oracle storage oracle = oracles[oracleIndex];
require(msg.sender == oracle.owner, 'OracleCreator: CALLER_NOT_OWNER');
require(oracle.observationsCount < 2, 'OracleCreator: FINISHED_OBERSERVATION');
(uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) =
DXswapOracleLibrary.currentCumulativePrices(address(oracle.pair));
uint32 timeElapsed = blockTimestamp - oracle.blockTimestampLast; // overflow is desired
// first update can be executed immediately. Ensure that at least one full period has passed since the first update
require(
oracle.observationsCount == 0 || timeElapsed >= oracle.windowTime,
'OracleCreator: PERIOD_NOT_ELAPSED'
);
// overflow is desired, casting never truncates
// cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed
oracle.price0Average = FixedPoint.uq112x112(
uint224((price0Cumulative - oracle.price0CumulativeLast) / timeElapsed)
);
oracle.price1Average = FixedPoint.uq112x112(
uint224((price1Cumulative - oracle.price1CumulativeLast) / timeElapsed)
);
oracle.price0CumulativeLast = price0Cumulative;
oracle.price1CumulativeLast = price1Cumulative;
oracle.blockTimestampLast = blockTimestamp;
oracle.observationsCount++;
}
// note this will always return 0 before update has been called successfully for the first time.
function consult(uint256 oracleIndex, address token, uint256 amountIn) external view returns (uint256 amountOut) {
Oracle storage oracle = oracles[oracleIndex];
FixedPoint.uq112x112 memory avg;
if (token == oracle.token0) {
avg = oracle.price0Average;
} else {
require(token == oracle.token1, 'OracleCreator: INVALID_TOKEN');
avg = oracle.price1Average;
}
amountOut = avg.mul(amountIn).decode144();
}
function isOracleFinalized(uint256 oracleIndex) external view returns (bool){
return oracles[oracleIndex].observationsCount == 2;
}
function getOracleDetails(uint256 oracleIndex) external view returns (Oracle memory) {
return oracles[oracleIndex];
}
}
// File: contracts/GnosisProtocolRelayer.sol
pragma solidity =0.6.6;
pragma experimental ABIEncoderV2;
contract GnosisProtocolRelayer {
using SafeMath for uint256;
event NewOrder(
uint256 indexed _orderIndex
);
event PlacedTrade(
uint256 indexed _orderIndex,
uint256 _gpOrderID,
uint16 buyToken,
uint16 sellToken,
uint32 validUntil,
uint128 expectedAmountMin,
uint128 tokenInAmount
);
event PlacedExactTrade(
uint16 _gpOrderID,
uint16 buyToken,
uint16 sellToken,
uint32 validFrom,
uint32 validUntil,
uint128 tokenOutAmount,
uint128 tokenInAmount
);
event WithdrawnExpiredOrder(
uint256 indexed _orderIndex
);
struct Order {
address tokenIn;
address tokenOut;
uint128 tokenInAmount;
uint128 minTokenOutAmount;
uint256 priceTolerance;
uint256 minReserve;
address oraclePair;
uint256 startDate;
uint256 deadline;
uint256 oracleId;
uint256 gpOrderId;
address factory;
bool executed;
}
uint256 public immutable GAS_ORACLE_UPDATE = 168364;
uint256 public immutable PARTS_PER_MILLION = 1000000;
uint256 public immutable BOUNTY = 0.01 ether;
uint256 public immutable ORACLE_WINDOW_TIME = 120; // 2 Minutes
uint32 public immutable BATCH_TIME;
uint32 public immutable UINT32_MAX_VALUE = 2**32 - 1;
uint128 public immutable UINT128_MAX_VALUE = 2**128 - 1;
address public immutable batchExchange;
address public immutable epochTokenLocker;
address payable public owner;
address public immutable WETH;
OracleCreator public oracleCreator;
uint256 public orderCount;
mapping(uint256 => Order) public orders;
mapping(address => bool) public exchangeFactoryWhitelist;
constructor(
address payable _owner,
address _batchExchange,
address _epochTokenLocker,
address[] memory _factoryWhitelist,
address _WETH,
OracleCreator _oracleCreater
) public {
require(_factoryWhitelist.length > 0, 'GnosisProtocolRelayer: MISSING_FACTORY_WHITELIST');
batchExchange = _batchExchange;
epochTokenLocker = _epochTokenLocker;
oracleCreator = _oracleCreater;
owner = _owner;
WETH = _WETH;
BATCH_TIME = IEpochTokenLocker(_epochTokenLocker).BATCH_TIME();
for (uint i=0; i < _factoryWhitelist.length; i++) {
exchangeFactoryWhitelist[_factoryWhitelist[i]] = true;
}
}
function orderTrade(
address tokenIn,
address tokenOut,
uint128 tokenInAmount,
uint128 minTokenOutAmount,
uint256 priceTolerance,
uint256 minReserve,
uint256 startDate,
uint256 deadline,
address factory
) external payable returns (uint256 orderIndex) {
require(exchangeFactoryWhitelist[factory], 'GnosisProtocolRelayer: INVALID_FACTORY');
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
require(tokenIn != tokenOut, 'GnosisProtocolRelayer: INVALID_PAIR');
require(tokenInAmount > 0 && minTokenOutAmount > 0, 'GnosisProtocolRelayer: INVALID_TOKEN_AMOUNT');
require(priceTolerance <= PARTS_PER_MILLION, 'GnosisProtocolRelayer: INVALID_TOLERANCE');
require(deadline <= UINT32_MAX_VALUE, 'GnosisProtocolRelayer: INVALID_DEADLINE');
require(block.timestamp <= deadline, 'GnosisProtocolRelayer: DEADLINE_REACHED');
if (tokenIn == address(0)) {
require(address(this).balance >= tokenInAmount, 'GnosisProtocolRelayer: INSUFFICIENT_ETH');
tokenIn = WETH;
IWETH(WETH).deposit{value: tokenInAmount}();
} else if (tokenOut == address(0)) {
tokenOut = WETH;
}
require(IERC20(tokenIn).balanceOf(address(this)) >= tokenInAmount, 'GnosisProtocolRelayer: INSUFFIENT_TOKEN_IN');
address pair = _pair(tokenIn, tokenOut, factory);
require(pair != address(0), 'GnosisProtocolRelayer: UNKOWN_PAIR');
orderIndex = _OrderIndex();
orders[orderIndex] = Order({
tokenIn: tokenIn,
tokenOut: tokenOut,
tokenInAmount: tokenInAmount,
minTokenOutAmount: minTokenOutAmount,
priceTolerance: priceTolerance,
minReserve: minReserve,
oraclePair: pair,
startDate: startDate,
deadline: deadline,
oracleId: 0,
gpOrderId: 0,
factory: factory,
executed: false
});
/* Create an oracle to calculate average price */
orders[orderIndex].oracleId = oracleCreator.createOracle(ORACLE_WINDOW_TIME, pair);
emit NewOrder(orderIndex);
}
function placeTrade(uint256 orderIndex) external {
Order storage order = orders[orderIndex];
require(orderIndex < orderCount, 'GnosisProtocolRelayer: INVALID_ORDER');
require(!order.executed, 'GnosisProtocolRelayer: ORDER_EXECUTED');
require(oracleCreator.isOracleFinalized(order.oracleId) , 'GnosisProtocolRelayer: OBSERVATION_RUNNING');
require(block.timestamp <= order.deadline, 'GnosisProtocolRelayer: DEADLINE_REACHED');
require(block.timestamp > order.startDate , 'GnosisProtocolRelayer: FUTURE_STARTDATE');
order.executed = true;
/* Approve token on Gnosis Protocol */
TransferHelper.safeApprove(order.tokenIn, epochTokenLocker, order.tokenInAmount);
/* Deposit token in Gnosis Protocol */
IEpochTokenLocker(epochTokenLocker).deposit(order.tokenIn, order.tokenInAmount);
/* Lookup TokenIds in Gnosis Protocol */
uint16 sellToken = IBatchExchange(batchExchange).tokenAddressToIdMap(order.tokenIn);
uint16 buyToken = IBatchExchange(batchExchange).tokenAddressToIdMap(order.tokenOut);
uint256 expectedAmount = oracleCreator.consult(
order.oracleId,
order.tokenIn == address(0) ? WETH : order.tokenIn,
order.tokenInAmount
);
uint256 expectedAmountMin = expectedAmount.sub(expectedAmount.mul(order.priceTolerance) / PARTS_PER_MILLION);
require(expectedAmountMin >= order.minTokenOutAmount, 'GnosisProtocolRelayer: INVALID_PRICE_RANGE');
require(expectedAmountMin <= UINT128_MAX_VALUE,'GnosisProtocolRelayer: AMOUNT_OUT_OF_RANGE');
/* Calculate batch Deadline (5 Minutes window) */
uint32 validUntil = uint32(order.deadline/BATCH_TIME);
uint256 gpOrderId = IBatchExchange(batchExchange).placeOrder(buyToken, sellToken, validUntil, uint128(expectedAmountMin), order.tokenInAmount);
order.gpOrderId = gpOrderId;
emit PlacedTrade(orderIndex, gpOrderId, buyToken, sellToken, validUntil, uint128(expectedAmountMin), order.tokenInAmount);
}
function placeExactTrade(
address tokenIn,
address tokenOut,
uint128 tokenInAmount,
uint128 tokenOutAmount,
uint256 startDate,
uint256 deadline
) external {
require(startDate < deadline, 'GnosisProtocolRelayer: INVALID_STARTDATE');
require(block.timestamp <= deadline, 'GnosisProtocolRelayer: DEADLINE_REACHED');
require(deadline <= UINT32_MAX_VALUE, 'GnosisProtocolRelayer: INVALID_DEADLINE');
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
require(tokenIn != tokenOut, 'GnosisProtocolRelayer: INVALID_PAIR');
require(tokenInAmount > 0 && tokenOutAmount > 0, 'GnosisProtocolRelayer: INVALID_TOKEN_AMOUNT');
if (tokenIn == address(0)) {
require(address(this).balance >= tokenInAmount, 'GnosisProtocolRelayer: INSUFFICIENT_ETH');
tokenIn = WETH;
IWETH(WETH).deposit{value: tokenInAmount}();
} else if (tokenOut == address(0)) {
tokenOut = WETH;
}
require(IERC20(tokenIn).balanceOf(address(this)) >= tokenInAmount, 'GnosisProtocolRelayer: INSUFFIENT_TOKEN_IN');
/* Extend startDate if needed, to make sure the order will be placed on GP */
if(startDate <= block.timestamp){
startDate = block.timestamp.add(ORACLE_WINDOW_TIME) < deadline ? block.timestamp.add(ORACLE_WINDOW_TIME) : startDate;
}
/* Approve token on Gnosis Protocol */
TransferHelper.safeApprove(tokenIn, epochTokenLocker, tokenInAmount);
/* Deposit token in Gnosis Protocol */
IEpochTokenLocker(epochTokenLocker).deposit(tokenIn, tokenInAmount);
uint16[] memory sellTokens = new uint16[](1);
uint16[] memory buyTokens = new uint16[](1);
uint32[] memory validFroms = new uint32[](1);
uint32[] memory validUntils = new uint32[](1);
uint128[] memory buyAmounts = new uint128[](1);
uint128[] memory sellAmounts = new uint128[](1);
/* Lookup TokenIds in Gnosis Protocol */
sellTokens[0] = IBatchExchange(batchExchange).tokenAddressToIdMap(tokenIn);
buyTokens[0] = IBatchExchange(batchExchange).tokenAddressToIdMap(tokenOut);
validFroms[0] = uint32(startDate/BATCH_TIME);
validUntils[0] = uint32(deadline/BATCH_TIME);
buyAmounts[0] = tokenOutAmount;
sellAmounts[0] = tokenInAmount;
uint16[] memory gpOrderId = IBatchExchange(batchExchange).placeValidFromOrders(buyTokens, sellTokens, validFroms, validUntils, buyAmounts, sellAmounts);
emit PlacedExactTrade(gpOrderId[0], buyTokens[0], sellTokens[0], validFroms[0], validUntils[0], buyAmounts[0], sellAmounts[0]);
}
function cancelOrder(uint16 gpOrderId) external {
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
uint16[] memory orderArray = new uint16[](1);
orderArray[0] = uint16(gpOrderId);
IBatchExchange(batchExchange).cancelOrders(orderArray);
}
// Updates a price oracle and sends a bounty to msg.sender
function updateOracle(uint256 orderIndex) external {
Order storage order = orders[orderIndex];
require(orderIndex < orderCount, 'GnosisProtocolRelayer: INVALID_ORDER');
require(block.timestamp <= order.deadline, 'GnosisProtocolRelayer: DEADLINE_REACHED');
require(!oracleCreator.isOracleFinalized(order.oracleId) , 'GnosisProtocolRelayer: OBSERVATION_ENDED');
require(block.timestamp > order.startDate, 'GnosisProtocolRelayer: FUTURE_STARTDATE');
uint256 amountBounty = GAS_ORACLE_UPDATE.mul(tx.gasprice).add(BOUNTY);
(uint reserve0, uint reserve1,) = IDXswapPair(order.oraclePair).getReserves();
address token0 = IDXswapPair(order.oraclePair).token0();
address tokenIn = order.tokenIn == address(0) ? WETH : order.tokenIn;
// Makes sure the reserve of TokenIn is higher then minReserve
if(tokenIn == token0){
require(
reserve0 >= order.minReserve,
'GnosisProtocolRelayer: RESERVE_TO_LOW'
);
} else {
require(
reserve1 >= order.minReserve,
'GnosisProtocolRelayer: RESERVE_TO_LOW'
);
}
oracleCreator.update(order.oracleId);
if(address(this).balance >= amountBounty){
TransferHelper.safeTransferETH(msg.sender, amountBounty);
}
}
function withdrawExpiredOrder(uint256 orderIndex) external {
Order storage order = orders[orderIndex];
require(orderIndex < orderCount, 'GnosisProtocolRelayer: INVALID_ORDER');
require(block.timestamp > order.deadline, 'GnosisProtocolRelayer: DEADLINE_NOT_REACHED');
require(!order.executed, 'GnosisProtocolRelayer: ORDER_EXECUTED');
if (order.tokenIn == WETH) {
IWETH(WETH).withdraw(order.tokenInAmount);
TransferHelper.safeTransferETH(owner, order.tokenInAmount);
} else {
TransferHelper.safeTransfer(order.tokenIn, owner, order.tokenInAmount);
}
order.executed = true;
emit WithdrawnExpiredOrder(orderIndex);
}
// Requests a token withdraw on GP
function requestWithdraw(address token, uint256 amount) public{
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
IEpochTokenLocker(epochTokenLocker).requestWithdraw(token,amount);
}
// Releases tokens from Gnosis Protocol
function withdrawToken(address token) public {
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
IEpochTokenLocker(epochTokenLocker).withdraw(address(this), token);
if (token == WETH) {
uint balance = IWETH(WETH).balanceOf(address(this));
IWETH(WETH).withdraw(balance);
ETHWithdraw(balance);
} else {
uint balance = IERC20(token).balanceOf(address(this));
ERC20Withdraw(token, balance);
}
}
// Internal function to return the pair address on a given factory
function _pair(address tokenA, address tokenB, address factory) internal view returns (address pair) {
require(exchangeFactoryWhitelist[factory], 'GnosisProtocolRelayer: INVALID_FACTORY');
pair = IDXswapFactory(factory).getPair(tokenA, tokenB);
}
// Returns an OrderIndex that is used to reference liquidity orders
function _OrderIndex() internal returns(uint256 orderIndex){
orderIndex = orderCount;
orderCount++;
}
function changeOwner(address payable _newOwner) public{
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
owner = _newOwner;
}
// Allows the owner to withdraw any ERC20 from the relayer
function ERC20Withdraw(address token, uint256 amount) public {
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
TransferHelper.safeTransfer(token, owner, amount);
}
// Allows the owner to withdraw any ETH amount from the relayer
function ETHWithdraw(uint256 amount) public {
require(msg.sender == owner, 'GnosisProtocolRelayer: CALLER_NOT_OWNER');
TransferHelper.safeTransferETH(owner, amount);
}
// Returns the data of one specific order
function GetOrderDetails(uint256 orderIndex) external view returns (Order memory) {
return orders[orderIndex];
}
receive() external payable {}
}

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_owner","internalType":"address payable"},{"type":"address","name":"_batchExchange","internalType":"address"},{"type":"address","name":"_epochTokenLocker","internalType":"address"},{"type":"address[]","name":"_factoryWhitelist","internalType":"address[]"},{"type":"address","name":"_WETH","internalType":"address"},{"type":"address","name":"_oracleCreater","internalType":"contract OracleCreator"}]},{"type":"event","name":"NewOrder","inputs":[{"type":"uint256","name":"_orderIndex","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"PlacedExactTrade","inputs":[{"type":"uint16","name":"_gpOrderID","internalType":"uint16","indexed":false},{"type":"uint16","name":"buyToken","internalType":"uint16","indexed":false},{"type":"uint16","name":"sellToken","internalType":"uint16","indexed":false},{"type":"uint32","name":"validFrom","internalType":"uint32","indexed":false},{"type":"uint32","name":"validUntil","internalType":"uint32","indexed":false},{"type":"uint128","name":"tokenOutAmount","internalType":"uint128","indexed":false},{"type":"uint128","name":"tokenInAmount","internalType":"uint128","indexed":false}],"anonymous":false},{"type":"event","name":"PlacedTrade","inputs":[{"type":"uint256","name":"_orderIndex","internalType":"uint256","indexed":true},{"type":"uint256","name":"_gpOrderID","internalType":"uint256","indexed":false},{"type":"uint16","name":"buyToken","internalType":"uint16","indexed":false},{"type":"uint16","name":"sellToken","internalType":"uint16","indexed":false},{"type":"uint32","name":"validUntil","internalType":"uint32","indexed":false},{"type":"uint128","name":"expectedAmountMin","internalType":"uint128","indexed":false},{"type":"uint128","name":"tokenInAmount","internalType":"uint128","indexed":false}],"anonymous":false},{"type":"event","name":"WithdrawnExpiredOrder","inputs":[{"type":"uint256","name":"_orderIndex","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"BATCH_TIME","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BOUNTY","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"ERC20Withdraw","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"ETHWithdraw","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"GAS_ORACLE_UPDATE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct GnosisProtocolRelayer.Order","components":[{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint128","name":"tokenInAmount","internalType":"uint128"},{"type":"uint128","name":"minTokenOutAmount","internalType":"uint128"},{"type":"uint256","name":"priceTolerance","internalType":"uint256"},{"type":"uint256","name":"minReserve","internalType":"uint256"},{"type":"address","name":"oraclePair","internalType":"address"},{"type":"uint256","name":"startDate","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint256","name":"oracleId","internalType":"uint256"},{"type":"uint256","name":"gpOrderId","internalType":"uint256"},{"type":"address","name":"factory","internalType":"address"},{"type":"bool","name":"executed","internalType":"bool"}]}],"name":"GetOrderDetails","inputs":[{"type":"uint256","name":"orderIndex","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"ORACLE_WINDOW_TIME","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PARTS_PER_MILLION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint128","name":"","internalType":"uint128"}],"name":"UINT128_MAX_VALUE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"UINT32_MAX_VALUE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WETH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"batchExchange","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelOrder","inputs":[{"type":"uint16","name":"gpOrderId","internalType":"uint16"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"changeOwner","inputs":[{"type":"address","name":"_newOwner","internalType":"address payable"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"epochTokenLocker","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"exchangeFactoryWhitelist","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract OracleCreator"}],"name":"oracleCreator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"orderCount","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint256","name":"orderIndex","internalType":"uint256"}],"name":"orderTrade","inputs":[{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint128","name":"tokenInAmount","internalType":"uint128"},{"type":"uint128","name":"minTokenOutAmount","internalType":"uint128"},{"type":"uint256","name":"priceTolerance","internalType":"uint256"},{"type":"uint256","name":"minReserve","internalType":"uint256"},{"type":"uint256","name":"startDate","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"address","name":"factory","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint128","name":"tokenInAmount","internalType":"uint128"},{"type":"uint128","name":"minTokenOutAmount","internalType":"uint128"},{"type":"uint256","name":"priceTolerance","internalType":"uint256"},{"type":"uint256","name":"minReserve","internalType":"uint256"},{"type":"address","name":"oraclePair","internalType":"address"},{"type":"uint256","name":"startDate","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint256","name":"oracleId","internalType":"uint256"},{"type":"uint256","name":"gpOrderId","internalType":"uint256"},{"type":"address","name":"factory","internalType":"address"},{"type":"bool","name":"executed","internalType":"bool"}],"name":"orders","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"placeExactTrade","inputs":[{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint128","name":"tokenInAmount","internalType":"uint128"},{"type":"uint128","name":"tokenOutAmount","internalType":"uint128"},{"type":"uint256","name":"startDate","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"placeTrade","inputs":[{"type":"uint256","name":"orderIndex","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"requestWithdraw","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateOracle","inputs":[{"type":"uint256","name":"orderIndex","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawExpiredOrder","inputs":[{"type":"uint256","name":"orderIndex","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawToken","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
            

Deployed ByteCode

0x6080604052600436106101a05760003560e01c80638c0a63bf116100ec578063c58125bc1161008a578063d530f4e711610064578063d530f4e71461046b578063e48c015e1461048b578063ec6ea812146104a0578063ffc5ea0d146104b5576101a7565b8063c58125bc14610416578063d081f2b814610436578063d41bee561461044b576101a7565b8063a6f9dae1116100c6578063a6f9dae114610388578063a85c38ef146103a8578063ad5c4648146103e1578063c23c1c9f146103f6576101a7565b80638c0a63bf1461034b5780638da5cb5b146103605780638efcc75014610375576101a7565b8063397a1b2811610159578063607695511161013357806360769551146102ec57806378f75317146103015780638570c8a914610316578063894760691461032b576101a7565b8063397a1b281461028a5780633e93e201146102aa57806351905c4d146102cc576101a7565b806309656365146101ac5780630b34538e146101d75780631373f170146101f957806322872106146102265780632453ffa8146102485780632cb2db611461026a576101a7565b366101a757005b600080fd5b3480156101b857600080fd5b506101c16104e2565b6040516101ce91906139b0565b60405180910390f35b3480156101e357600080fd5b506101ec610506565b6040516101ce9190613079565b34801561020557600080fd5b50610219610214366004612c82565b61052a565b6040516101ce9190613208565b34801561023257600080fd5b50610246610241366004612f0d565b61053f565b005b34801561025457600080fd5b5061025d610637565b6040516101ce9190613a4b565b34801561027657600080fd5b50610246610285366004612f45565b61063d565b34801561029657600080fd5b506102466102a5366004612dc3565b610815565b3480156102b657600080fd5b506102bf61088d565b6040516101ce9190613ad1565b3480156102d857600080fd5b506102466102e7366004612cc1565b6108b1565b3480156102f857600080fd5b506101ec61117f565b34801561030d57600080fd5b5061025d6111a3565b34801561032257600080fd5b506101ec6111c7565b34801561033757600080fd5b50610246610346366004612c82565b6111d6565b34801561035757600080fd5b5061025d61147b565b34801561036c57600080fd5b506101ec61149f565b61025d610383366004612d2e565b6114ae565b34801561039457600080fd5b506102466103a3366004612c82565b611b30565b3480156103b457600080fd5b506103c86103c3366004612f45565b611b7c565b6040516101ce9d9c9b9a999897969594939291906130a7565b3480156103ed57600080fd5b506101ec611bfe565b34801561040257600080fd5b50610246610411366004612f45565b611c22565b34801561042257600080fd5b50610246610431366004612f45565b611ff8565b34801561044257600080fd5b5061025d612038565b34801561045757600080fd5b50610246610466366004612f45565b61205c565b34801561047757600080fd5b50610246610486366004612dc3565b6126df565b34801561049757600080fd5b506102bf612721565b3480156104ac57600080fd5b5061025d612745565b3480156104c157600080fd5b506104d56104d0366004612f45565b612769565b6040516101ce91906138e1565b7f00000000000000000000000000000000ffffffffffffffffffffffffffffffff81565b7f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631381565b60046020526000908152604090205460ff1681565b6000546001600160a01b031633146105725760405162461bcd60e51b8152600401610569906132c3565b60405180910390fd5b6040805160018082528183019092526060916020808301908036833701905050905081816000815181106105a257fe5b61ffff909216602092830291909101909101526040516312f706d360e21b81526001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae263131690634bdc1b4c90610601908490600401613175565b600060405180830381600087803b15801561061b57600080fd5b505af115801561062f573d6000803e3d6000fd5b505050505050565b60025481565b6000818152600360205260409020600254821061066c5760405162461bcd60e51b8152600401610569906137c8565b8060070154421161068f5760405162461bcd60e51b8152600401610569906133df565b600a810154600160a01b900460ff16156106bb5760405162461bcd60e51b81526004016105699061354a565b80547f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b03908116911614156107a7576002810154604051632e1a7d4d60e01b81526001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d1691632e1a7d4d9161074a916001600160801b0316906004016139b0565b600060405180830381600087803b15801561076457600080fd5b505af1158015610778573d6000803e3d6000fd5b505060005460028401546107a293506001600160a01b0390911691506001600160801b031661283e565b6107d1565b805460005460028301546107d1926001600160a01b039081169216906001600160801b03166128d0565b600a8101805460ff60a01b1916600160a01b17905560405182907f3f9d01b8340245ea975087559a7911155f1b300f5b19aa35fcc67d4adf962c8590600090a25050565b6000546001600160a01b0316331461083f5760405162461bcd60e51b8152600401610569906132c3565b60405163072f436560e31b81526001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae26313169063397a1b2890610601908590859060040161315c565b7f00000000000000000000000000000000000000000000000000000000ffffffff81565b8082106108d05760405162461bcd60e51b81526004016105699061384f565b804211156108f05760405162461bcd60e51b815260040161056990613503565b7f00000000000000000000000000000000000000000000000000000000ffffffff63ffffffff168111156109365760405162461bcd60e51b8152600401610569906136ac565b6000546001600160a01b031633146109605760405162461bcd60e51b8152600401610569906132c3565b846001600160a01b0316866001600160a01b031614156109925760405162461bcd60e51b815260040161056990613785565b6000846001600160801b03161180156109b457506000836001600160801b0316115b6109d05760405162461bcd60e51b8152600401610569906136f3565b6001600160a01b038616610aac57836001600160801b0316471015610a075760405162461bcd60e51b81526004016105699061373e565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d95507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663d0e30db0856001600160801b03166040518263ffffffff1660e01b81526004016000604051808303818588803b158015610a8e57600080fd5b505af1158015610aa2573d6000803e3d6000fd5b5050505050610ade565b6001600160a01b038516610ade577f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d94505b6040516370a0823160e01b81526001600160801b038516906001600160a01b038816906370a0823190610b15903090600401613079565b60206040518083038186803b158015610b2d57600080fd5b505afa158015610b41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b659190612f5d565b1015610b835760405162461bcd60e51b815260040161056990613897565b428211610bf95780610bbb427f000000000000000000000000000000000000000000000000000000000000007863ffffffff6129be16565b10610bc65781610bf6565b610bf6427f000000000000000000000000000000000000000000000000000000000000007863ffffffff6129be16565b91505b610c2d867f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae26313866001600160801b03166129e7565b6040516311f9fbc960e21b81526001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631316906347e7ef2490610c7b908990889060040161313a565b600060405180830381600087803b158015610c9557600080fd5b505af1158015610ca9573d6000803e3d6000fd5b50506040805160018082528183019092526060935091506020808301908036833750506040805160018082528183019092529293506060929150602080830190803683375050604080516001808252818301909252929350606092915060208083019080368337505060408051600180825281830190925292935060609291506020808301908036833750506040805160018082528183019092529293506060929150602080830190803683375050604080516001808252818301909252929350606092915060208083019080368337505060405163ef574d2360e01b8152919250507f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae263136001600160a01b03169063ef574d2390610dcb908f90600401613079565b60206040518083038186803b158015610de357600080fd5b505afa158015610df7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1b9190612f29565b86600081518110610e2857fe5b61ffff9092166020928302919091019091015260405163ef574d2360e01b81526001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae26313169063ef574d2390610e87908e90600401613079565b60206040518083038186803b158015610e9f57600080fd5b505afa158015610eb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed79190612f29565b85600081518110610ee457fe5b602002602001019061ffff16908161ffff16815250507f000000000000000000000000000000000000000000000000000000000000012c63ffffffff168881610f2957fe5b0484600081518110610f3757fe5b63ffffffff92831660209182029290920101527f000000000000000000000000000000000000000000000000000000000000012c168781610f7457fe5b0483600081518110610f8257fe5b602002602001019063ffffffff16908163ffffffff16815250508882600081518110610faa57fe5b60200260200101906001600160801b031690816001600160801b0316815250508981600081518110610fd857fe5b6001600160801b0390921660209283029190910190910152604051630cb987cf60e31b81526060906001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631316906365cc3e78906110499089908b908a908a908a908a90600401613188565b600060405180830381600087803b15801561106357600080fd5b505af1158015611077573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261109f9190810190612dee565b90507f01af62d09ed939370efb84d9ac03be2f8d7a61ce23d184a59a939c9319b5fad5816000815181106110cf57fe5b6020026020010151876000815181106110e457fe5b6020026020010151896000815181106110f957fe5b60200260200101518860008151811061110e57fe5b60200260200101518860008151811061112357fe5b60200260200101518860008151811061113857fe5b60200260200101518860008151811061114d57fe5b602002602001015160405161116897969594939291906139c4565b60405180910390a150505050505050505050505050565b7f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631381565b7f000000000000000000000000000000000000000000000000000000000000007881565b6001546001600160a01b031681565b6000546001600160a01b031633146112005760405162461bcd60e51b8152600401610569906132c3565b60405163f940e38560e01b81526001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae26313169063f940e3859061124e903090859060040161308d565b600060405180830381600087803b15801561126857600080fd5b505af115801561127c573d6000803e3d6000fd5b505050507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b0316816001600160a01b031614156113eb576040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d16906370a0823190611309903090600401613079565b602060405180830381600087803b15801561132357600080fd5b505af1158015611337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135b9190612f5d565b604051632e1a7d4d60e01b81529091506001600160a01b037f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d1690632e1a7d4d906113aa908490600401613a4b565b600060405180830381600087803b1580156113c457600080fd5b505af11580156113d8573d6000803e3d6000fd5b505050506113e581611ff8565b50611478565b6040516370a0823160e01b81526000906001600160a01b038316906370a082319061141a903090600401613079565b60206040518083038186803b15801561143257600080fd5b505afa158015611446573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146a9190612f5d565b905061147682826126df565b505b50565b7f00000000000000000000000000000000000000000000000000000000000291ac81565b6000546001600160a01b031681565b6001600160a01b03811660009081526004602052604081205460ff166114e65760405162461bcd60e51b81526004016105699061361e565b6000546001600160a01b031633146115105760405162461bcd60e51b8152600401610569906132c3565b886001600160a01b03168a6001600160a01b031614156115425760405162461bcd60e51b815260040161056990613785565b6000886001600160801b031611801561156457506000876001600160801b0316115b6115805760405162461bcd60e51b8152600401610569906136f3565b7f00000000000000000000000000000000000000000000000000000000000f42408611156115c05760405162461bcd60e51b81526004016105699061342a565b7f00000000000000000000000000000000000000000000000000000000ffffffff63ffffffff168311156116065760405162461bcd60e51b8152600401610569906136ac565b824211156116265760405162461bcd60e51b815260040161056990613503565b6001600160a01b038a1661170257876001600160801b031647101561165d5760405162461bcd60e51b81526004016105699061373e565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d99507f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d6001600160a01b031663d0e30db0896001600160801b03166040518263ffffffff1660e01b81526004016000604051808303818588803b1580156116e457600080fd5b505af11580156116f8573d6000803e3d6000fd5b5050505050611734565b6001600160a01b038916611734577f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d98505b6040516370a0823160e01b81526001600160801b038916906001600160a01b038c16906370a082319061176b903090600401613079565b60206040518083038186803b15801561178357600080fd5b505afa158015611797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117bb9190612f5d565b10156117d95760405162461bcd60e51b815260040161056990613897565b60006117e68b8b85612ace565b90506001600160a01b03811661180e5760405162461bcd60e51b81526004016105699061339d565b611816612b8c565b9150604051806101a001604052808c6001600160a01b031681526020018b6001600160a01b031681526020018a6001600160801b03168152602001896001600160801b03168152602001888152602001878152602001826001600160a01b031681526020018681526020018581526020016000815260200160008152602001846001600160a01b03168152602001600015158152506003600084815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160801b0302191690836001600160801b0316021790555060608201518160020160106101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816003015560a0820151816004015560c08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e0820151816006015561010082015181600701556101208201518160080155610140820151816009015561016082015181600a0160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061018082015181600a0160146101000a81548160ff021916908315150217905550905050600160009054906101000a90046001600160a01b03166001600160a01b03166306649d677f0000000000000000000000000000000000000000000000000000000000000078836040518363ffffffff1660e01b8152600401611a93929190613a54565b602060405180830381600087803b158015611aad57600080fd5b505af1158015611ac1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae59190612f5d565b60008381526003602052604080822060080192909255905183917fd56de72b04be4cf70c2bab5e6905fb51e28beb22f7a5d40a6dc4103149d6110691a2509998505050505050505050565b6000546001600160a01b03163314611b5a5760405162461bcd60e51b8152600401610569906132c3565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b600360208190526000918252604090912080546001820154600283015493830154600484015460058501546006860154600787015460088801546009890154600a909901546001600160a01b039889169a978916996001600160801b03808a169a600160801b909a04169895861695909190811690600160a01b900460ff168d565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d81565b60008181526003602052604090206002548210611c515760405162461bcd60e51b8152600401610569906137c8565b8060070154421115611c755760405162461bcd60e51b815260040161056990613503565b60015460088201546040516325fa700360e01b81526001600160a01b03909216916325fa700391611ca891600401613a4b565b60206040518083038186803b158015611cc057600080fd5b505afa158015611cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf89190612e99565b15611d155760405162461bcd60e51b815260040161056990613664565b80600601544211611d385760405162461bcd60e51b8152600401610569906134bc565b6000611d9a7f000000000000000000000000000000000000000000000000002386f26fc10000611d8e7f00000000000000000000000000000000000000000000000000000000000291ac3a63ffffffff612b9a16565b9063ffffffff6129be16565b90506000808360050160009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611def57600080fd5b505afa158015611e03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e279190612eb9565b506001600160701b031691506001600160701b0316915060008460050160009054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611e9057600080fd5b505afa158015611ea4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec89190612ca5565b85549091506000906001600160a01b031615611eee5785546001600160a01b0316611f10565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d5b9050816001600160a01b0316816001600160a01b03161415611f55578560040154841015611f505760405162461bcd60e51b81526004016105699061358f565b611f79565b8560040154831015611f795760405162461bcd60e51b81526004016105699061358f565b6001546008870154604051634155c48560e11b81526001600160a01b03909216916382ab890a91611fac91600401613a4b565b600060405180830381600087803b158015611fc657600080fd5b505af1158015611fda573d6000803e3d6000fd5b50505050844710611fef57611fef338661283e565b50505050505050565b6000546001600160a01b031633146120225760405162461bcd60e51b8152600401610569906132c3565b600054611478906001600160a01b03168261283e565b7f000000000000000000000000000000000000000000000000002386f26fc1000081565b6000818152600360205260409020600254821061208b5760405162461bcd60e51b8152600401610569906137c8565b600a810154600160a01b900460ff16156120b75760405162461bcd60e51b81526004016105699061354a565b60015460088201546040516325fa700360e01b81526001600160a01b03909216916325fa7003916120ea91600401613a4b565b60206040518083038186803b15801561210257600080fd5b505afa158015612116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213a9190612e99565b6121565760405162461bcd60e51b8152600401610569906135d4565b806007015442111561217a5760405162461bcd60e51b815260040161056990613503565b8060060154421161219d5760405162461bcd60e51b8152600401610569906134bc565b600a8101805460ff60a01b1916600160a01b179055805460028201546121f7916001600160a01b0316907f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae26313906001600160801b03166129e7565b805460028201546040516311f9fbc960e21b81526001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae263138116936347e7ef24936122589391909216916001600160801b03169060040161313a565b600060405180830381600087803b15801561227257600080fd5b505af1158015612286573d6000803e3d6000fd5b5050825460405163ef574d2360e01b8152600093506001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae263138116935063ef574d23926122dd92911690600401613079565b60206040518083038186803b1580156122f557600080fd5b505afa158015612309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232d9190612f29565b600183015460405163ef574d2360e01b81529192506000916001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631381169263ef574d2392612388929190911690600401613079565b60206040518083038186803b1580156123a057600080fd5b505afa1580156123b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123d89190612f29565b600154600885015485549293506000926001600160a01b0392831692634023282b929116156124115786546001600160a01b0316612433565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d5b60028801546040516001600160e01b031960e086901b1681526124649392916001600160801b031690600401613a6b565b60206040518083038186803b15801561247c57600080fd5b505afa158015612490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b49190612f5d565b905060006125097f00000000000000000000000000000000000000000000000000000000000f42406124f3876003015485612b9a90919063ffffffff16565b816124fa57fe5b8491900463ffffffff612bd116565b6002860154909150600160801b90046001600160801b03168110156125405760405162461bcd60e51b815260040161056990613279565b7f00000000000000000000000000000000ffffffffffffffffffffffffffffffff6001600160801b03168111156125895760405162461bcd60e51b815260040161056990613472565b60007f000000000000000000000000000000000000000000000000000000000000012c63ffffffff168660070154816125be57fe5b60028801546040516309b0f4e560e21b81529290910492506000916001600160a01b037f00000000000000000000000025b06305cc4ec6afcf3e7c0b673da1ef8ae2631316916326c3d394916126289189918b9188918a916001600160801b031690600401613a0e565b602060405180830381600087803b15801561264257600080fd5b505af1158015612656573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061267a9190612f5d565b60098801819055600288015460405191925089917f88ca32bc88b9ba1eb541a4d9618c0e6a930f18dcf83466822e5b20ed8ffc1b5a916126cd9185918a918c9189918b916001600160801b031690613a93565b60405180910390a25050505050505050565b6000546001600160a01b031633146127095760405162461bcd60e51b8152600401610569906132c3565b6000546114769083906001600160a01b0316836128d0565b7f000000000000000000000000000000000000000000000000000000000000012c81565b7f00000000000000000000000000000000000000000000000000000000000f424081565b612771612bf4565b5060009081526003602081815260409283902083516101a08101855281546001600160a01b039081168252600183015481169382019390935260028201546001600160801b0380821696830196909652600160801b90049094166060850152918201546080840152600482015460a08401526005820154811660c0840152600682015460e0840152600782015461010084015260088201546101208401526009820154610140840152600a90910154908116610160830152600160a01b900460ff16151561018082015290565b604080516000808252602082019092526001600160a01b0384169083906040516128689190613040565b60006040518083038185875af1925050503d80600081146128a5576040519150601f19603f3d011682016040523d82523d6000602084013e6128aa565b606091505b50509050806128cb5760405162461bcd60e51b81526004016105699061380c565b505050565b60006060846001600160a01b031663a9059cbb85856040516024016128f692919061315c565b6040516020818303038152906040529060e01b6020820180516001600160e01b03838183161783525050505060405161292f9190613040565b6000604051808303816000865af19150503d806000811461296c576040519150601f19603f3d011682016040523d82523d6000602084013e612971565b606091505b509150915081801561299b57508051158061299b57508080602001905181019061299b9190612e99565b6129b75760405162461bcd60e51b815260040161056990613242565b5050505050565b808201828110156129e15760405162461bcd60e51b815260040161056990613338565b92915050565b60006060846001600160a01b031663095ea7b38585604051602401612a0d92919061315c565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051612a469190613040565b6000604051808303816000865af19150503d8060008114612a83576040519150601f19603f3d011682016040523d82523d6000602084013e612a88565b606091505b5091509150818015612ab2575080511580612ab2575080806020019051810190612ab29190612e99565b6129b75760405162461bcd60e51b815260040161056990613366565b6001600160a01b03811660009081526004602052604081205460ff16612b065760405162461bcd60e51b81526004016105699061361e565b60405163e6a4390560e01b81526001600160a01b0383169063e6a4390590612b34908790879060040161308d565b60206040518083038186803b158015612b4c57600080fd5b505afa158015612b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b849190612ca5565b949350505050565b600280546001810190915590565b6000811580612bb557505080820282828281612bb257fe5b04145b6129e15760405162461bcd60e51b81526004016105699061330a565b808203828111156129e15760405162461bcd60e51b815260040161056990613213565b604080516101a081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081019190915290565b80356001600160801b03811681146129e157600080fd5b80516129e181613b48565b600060208284031215612c93578081fd5b8135612c9e81613b09565b9392505050565b600060208284031215612cb6578081fd5b8151612c9e81613b09565b60008060008060008060c08789031215612cd9578182fd5b8635612ce481613b09565b95506020870135612cf481613b09565b94506040870135612d0481613b33565b93506060870135612d1481613b33565b9598949750929560808101359460a0909101359350915050565b60008060008060008060008060006101208a8c031215612d4c578283fd5b8935612d5781613b09565b985060208a0135612d6781613b09565b9750612d768b60408c01612c60565b9650612d858b60608c01612c60565b955060808a0135945060a08a0135935060c08a0135925060e08a013591506101008a0135612db281613b09565b809150509295985092959850929598565b60008060408385031215612dd5578182fd5b8235612de081613b09565b946020939093013593505050565b60006020808385031215612e00578182fd5b825167ffffffffffffffff80821115612e17578384fd5b81850186601f820112612e28578485fd5b8051925081831115612e38578485fd5b8383029150612e48848301613ae2565b8381528481019082860184840187018a1015612e62578788fd5b8794505b85851015612e8c57612e788a82612c77565b835260019490940193918601918601612e66565b5098975050505050505050565b600060208284031215612eaa578081fd5b81518015158114612c9e578182fd5b600080600060608486031215612ecd578283fd5b8351612ed881613b1e565b6020850151909350612ee981613b1e565b604085015190925063ffffffff81168114612f02578182fd5b809150509250925092565b600060208284031215612f1e578081fd5b8135612c9e81613b48565b600060208284031215612f3a578081fd5b8151612c9e81613b48565b600060208284031215612f56578081fd5b5035919050565b600060208284031215612f6e578081fd5b5051919050565b6001600160a01b03169052565b6000815180845260208085019450808401835b83811015612fba5781516001600160801b031687529582019590820190600101612f95565b509495945050505050565b6000815180845260208085019450808401835b83811015612fba57815161ffff1687529582019590820190600101612fd8565b6000815180845260208085019450808401835b83811015612fba57815163ffffffff168752958201959082019060010161300b565b15159052565b6001600160801b03169052565b60008251815b818110156130605760208186018101518583015201613046565b8181111561306e5782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b038e811682528d811660208301526001600160801b038d811660408401528c166060830152608082018b905260a082018a9052881660c082015260e081018790526101008101869052610120810185905261014081018490526101a0810161311a610160830185612f75565b61312861018083018461302d565b9e9d5050505050505050505050505050565b6001600160a01b039290921682526001600160801b0316602082015260400190565b6001600160a01b03929092168252602082015260400190565b600060208252612c9e6020830184612fc5565b600060c0825261319b60c0830189612fc5565b82810360208401526131ad8189612fc5565b83810360408501526131bf8189612ff8565b91505082810360608401526131d48187612ff8565b83810360808501526131e68187612f82565b91505082810360a08401526131fb8185612f82565b9998505050505050505050565b901515815260200190565b60208082526015908201527464732d6d6174682d7375622d756e646572666c6f7760581b604082015260600190565b6020808252601f908201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604082015260600190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f50604082015269524943455f52414e474560b01b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a2043414c4c45525f4e4f6040820152662a2fa7aba722a960c91b606082015260800190565b60208082526014908201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604082015260600190565b60208082526014908201527364732d6d6174682d6164642d6f766572666c6f7760601b604082015260600190565b6020808252601e908201527f5472616e7366657248656c7065723a20415050524f56455f4641494c45440000604082015260600190565b60208082526022908201527f476e6f73697350726f746f636f6c52656c617965723a20554e4b4f574e5f504160408201526124a960f11b606082015260800190565b6020808252602b908201527f476e6f73697350726f746f636f6c52656c617965723a20444541444c494e455f60408201526a1393d517d4915050d2115160aa1b606082015260800190565b60208082526028908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f546040820152674f4c4552414e434560c01b606082015260800190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a20414d4f554e545f4f55604082015269545f4f465f52414e474560b01b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a204655545552455f53546040820152664152544441544560c81b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a20444541444c494e455f60408201526614915050d2115160ca1b606082015260800190565b60208082526025908201527f476e6f73697350726f746f636f6c52656c617965723a204f524445525f45584560408201526410d555115160da1b606082015260800190565b60208082526025908201527f476e6f73697350726f746f636f6c52656c617965723a20524553455256455f546040820152644f5f4c4f5760d81b606082015260800190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a204f42534552564154496040820152694f4e5f52554e4e494e4760b01b606082015260800190565b60208082526026908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f466040820152654143544f525960d01b606082015260800190565b60208082526028908201527f476e6f73697350726f746f636f6c52656c617965723a204f425345525641544960408201526713d397d15391115160c21b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f446040820152664541444c494e4560c81b606082015260800190565b6020808252602b908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f5460408201526a13d2d15397d05353d5539560aa1b606082015260800190565b60208082526027908201527f476e6f73697350726f746f636f6c52656c617965723a20494e5355464649434960408201526608a9ca8be8aa8960cb1b606082015260800190565b60208082526023908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f5060408201526220a4a960e91b606082015260800190565b60208082526024908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f4f604082015263292222a960e11b606082015260800190565b60208082526023908201527f5472616e7366657248656c7065723a204554485f5452414e534645525f46414960408201526213115160ea1b606082015260800190565b60208082526028908201527f476e6f73697350726f746f636f6c52656c617965723a20494e56414c49445f53604082015267544152544441544560c01b606082015260800190565b6020808252602a908201527f476e6f73697350726f746f636f6c52656c617965723a20494e5355464649454e6040820152692a2faa27a5a2a72fa4a760b11b606082015260800190565b60006101a0820190506138f5828451612f75565b60208301516139076020840182612f75565b50604083015161391a6040840182613033565b50606083015161392d6060840182613033565b506080830151608083015260a083015160a083015260c083015161395460c0840182612f75565b5060e083810151908301526101008084015190830152610120808401519083015261014080840151908301526101608084015161399382850182612f75565b5050610180808401516139a88285018261302d565b505092915050565b6001600160801b0391909116815260200190565b61ffff9788168152958716602087015293909516604085015263ffffffff91821660608501521660808301526001600160801b0392831660a083015290911660c082015260e00190565b61ffff958616815293909416602084015263ffffffff9190911660408301526001600160801b039081166060830152909116608082015260a00190565b90815260200190565b9182526001600160a01b0316602082015260400190565b9283526001600160a01b039190911660208301526001600160801b0316604082015260600190565b95865261ffff948516602087015292909316604085015263ffffffff1660608401526001600160801b0391821660808401521660a082015260c00190565b63ffffffff91909116815260200190565b60405181810167ffffffffffffffff81118282101715613b0157600080fd5b604052919050565b6001600160a01b038116811461147857600080fd5b6001600160701b038116811461147857600080fd5b6001600160801b038116811461147857600080fd5b61ffff8116811461147857600080fdfea2646970667358221220e4455149fb7f3c599c7b6b15d9d9badf93778ff94ddeb2b0e479db8d768840ee64736f6c63430006060033