Contract 0xc14769721abf735f26cc94949accdf9c263a9854

 
Ad
Ad
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc0063befae6f8ad832da0408052b69bcbdbc627f376ed1a101c3ae3a31751c77Token In Burn Fr...203438432021-10-18 10:35:1414 hrs 58 mins ago0x59fb16c10c52ce120e513f232af141901ad18d9b IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.00392391
0x5a5d88da5f9020390a98c106e9b3227853e2b5b1c5dcc73b942d49fc72ed167cFulfill Transact...203331772021-10-18 3:19:5122 hrs 13 mins ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.0068649
0x84116f3f84d7d3f259e79b2003a7ed5f779011a26cb5e2d0c7091b79827ea79dSyn Transaction203331712021-10-18 3:19:3922 hrs 13 mins ago0x772ea409a11a5453d815a5f543db4867f6ddc11b IN  0xc14769721abf735f26cc94949accdf9c263a98540.02 MATIC0.00210453
0xbef61f2bd9bde42e2cf9efc848db9f0b00ae626cfe0c169c0bc1919cb759efe3Fulfill Transact...203204662021-10-17 18:35:281 day 6 hrs ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.00481722
0x8b7880b9c3032dd43b706bb1661b20be0cafe4318ab74a90517ba4451f7473a2Syn Transaction203204612021-10-17 18:35:081 day 6 hrs ago0x772ea409a11a5453d815a5f543db4867f6ddc11b IN  0xc14769721abf735f26cc94949accdf9c263a98540.02 MATIC0.00210453
0xd03e3970b7a94310034fa75374fd7e1533935f81d18f2a1aa4a3ab04b30d85eaFulfill Transact...203196912021-10-17 18:05:171 day 7 hrs ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.003887776
0xdf40317518feb5680da1b4713cc814ea76f473559220c373ce43b57b716d8239Syn Transaction203196842021-10-17 18:05:031 day 7 hrs ago0x1f5697aa6bb2f97ad7e88b8aa927e1377f0c2f8d IN  0xc14769721abf735f26cc94949accdf9c263a98540.02 MATIC0.00210453
0x5c09e9a765f7ef49d59de1300944b803cc17b215962707578db8b68d773b432fFulfill Transact...203133152021-10-17 13:52:531 day 11 hrs ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.0045712242
0x55f7c7d9873ff40b17625f1e26a3d314e7308e6c2f4bf01f3a533e6e21695c68Syn Transaction203133082021-10-17 13:52:391 day 11 hrs ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.02 MATIC0.002314983
0xa9a318c916e2e2fcc9f77155b952d69633ad0eab80a60478cf958554139b9311Fulfill Liquidit...203124412021-10-17 13:09:261 day 12 hrs ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.001652013
0x4abe579f8763c15a56ef3d056e2dbcb0a1be3e43d950d0fcfd4b5939d391e9f5Remove Liquidity...203124342021-10-17 13:09:121 day 12 hrs ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.009727179
0xb5faf9418bba6a022177fc0ebe31515844889a8830b4ee01290451faf5ad10fcFulfill Liquidit...203124172021-10-17 13:08:381 day 12 hrs ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.001658514
0x774bbe3e1c726afe88e084be6a4dcb08520689a3ab1f03670d1da020746f85d1Remove Liquidity...203124102021-10-17 13:08:241 day 12 hrs ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.009725331
0x0ebbbdee3d15aa4a74aa651170fad21aa093815b0d140f4d8b1c4149a3b12ccbFulfill Liquidit...203123892021-10-17 13:07:421 day 12 hrs ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.00185691
0xd47e759b8cbe842968c2d73d890cee74b235b27dc02dc19f40b1ef49fdd8db38Remove Liquidity...203123822021-10-17 13:07:241 day 12 hrs ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.009725991
0x3b59b1dac433a980af9dda3c8ccb1383980b917e0345a7711b41ce425e3d2208Token In Burn Fr...203123232021-10-17 13:05:261 day 12 hrs ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.003751209
0x83429d9d99f8ff2b405d7f9b2a38fbfb5ee88cd0c8929103b7d9310060961189Token In Burn Fr...203123102021-10-17 13:04:561 day 12 hrs ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.003751209
0x4b5e6c3d4334911040ed865d6ac464e08840c5e0e32d81a3e2588e12523f385aToken In Burn Fr...203122752021-10-17 13:03:461 day 12 hrs ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.003752001
0x6ddecaa1866ee53e9304416efb2c692997dc061239ef89246e41db35a226b0abAdd Liquidity202995582021-10-17 3:59:031 day 21 hrs ago0x8583f073f7093d2ba2f86bd14a2c263e323a1f08 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.00322953
0x3ab247798ef005e568a80e209e5b8ae1d9c817314e2376f7a1c84080bc1b0fb4Fulfill Transact...202941322021-10-17 0:14:142 days 1 hr ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.003725394
0x345af1e1597a429c2ccae6da734b9448b96672f27eee1dbced9c3dde502c5760Syn Transaction202941272021-10-17 0:13:542 days 1 hr ago0x500899672e3cd240be796ecf73cb7aca54fa5afb IN  0xc14769721abf735f26cc94949accdf9c263a98540.02 MATIC0.002314983
0xdc8e6f9648ea8e7a24f05da063a03b9450e5ff2a8b47e768303f167fc8c05bdcToken In Burn Fr...202878722021-10-16 19:54:172 days 5 hrs ago0x772ea409a11a5453d815a5f543db4867f6ddc11b IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.00392427
0x3743a2376e26b17086eb1506214d417d7d8bcd1c8e614cda2b8857a3ca49c77dFulfill Transact...202848532021-10-16 17:57:342 days 7 hrs ago0xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa0 IN  0xc14769721abf735f26cc94949accdf9c263a98540 MATIC0.00445122
0xa8c32560b2a6759107849796743bc5aa0a792444aa203eb025b713b7d2eb8c7dSyn Transaction202848462021-10-16 17:57:202 days 7 hrs ago0x772ea409a11a5453d815a5f543db4867f6ddc11b IN  0xc14769721abf735f26cc94949accdf9c263a98540.02 MATIC0.000350755
0xd5df3f389c8e8abb6fb4142366d9b2e7193ccc7fc9567953c238dfac7386ea98Token In Burn Fr...202825952021-10-16 16:27:102 days 9 hrs ago0x8583f073f7093d2ba2f86bd14a2c263e323a1f08 IN  0xc14769721abf735f26cc94949accdf9c263a98540.01 MATIC0.00392355
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x84116f3f84d7d3f259e79b2003a7ed5f779011a26cb5e2d0c7091b79827ea79d203331712021-10-18 3:19:3922 hrs 13 mins ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0x8b7880b9c3032dd43b706bb1661b20be0cafe4318ab74a90517ba4451f7473a2203204612021-10-17 18:35:081 day 6 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0xdf40317518feb5680da1b4713cc814ea76f473559220c373ce43b57b716d8239203196842021-10-17 18:05:031 day 7 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0x55f7c7d9873ff40b17625f1e26a3d314e7308e6c2f4bf01f3a533e6e21695c68203133082021-10-17 13:52:391 day 11 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0x4abe579f8763c15a56ef3d056e2dbcb0a1be3e43d950d0fcfd4b5939d391e9f5203124342021-10-17 13:09:121 day 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0x774bbe3e1c726afe88e084be6a4dcb08520689a3ab1f03670d1da020746f85d1203124102021-10-17 13:08:241 day 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0xd47e759b8cbe842968c2d73d890cee74b235b27dc02dc19f40b1ef49fdd8db38203123822021-10-17 13:07:241 day 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.04 MATIC
0x345af1e1597a429c2ccae6da734b9448b96672f27eee1dbced9c3dde502c5760202941272021-10-17 0:13:542 days 1 hr ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.03 MATIC
0xa8c32560b2a6759107849796743bc5aa0a792444aa203eb025b713b7d2eb8c7d202848462021-10-16 17:57:202 days 7 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.03 MATIC
0x7a3813e684c733f006abb019a9cd03fc41ddabbc938d994be2330ed58514977d202819852021-10-16 16:01:582 days 9 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0x908b9c64db3a0b497e1770d0dda99371eb944deb48e896abbb998fe8ad37e54c202817032021-10-16 15:45:502 days 9 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0x35bc33b670f13108a7256d987bb53b8d758cf6b4b22fccbfc790e78b7eaa2c94202816502021-10-16 15:44:002 days 9 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0xeab171f963b630c9af512445da0dafd807d1b6128719df0401fc6d660666244b202816412021-10-16 15:43:422 days 9 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0xb9856c19eddd196073b0fa9da1dc165859293ccedd6095450dbb0d66ad96e3e5202814372021-10-16 15:36:422 days 9 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0xb53b537e2888df4dfd7e17e531b1c5c0528559b9ed0fc77defb9cf218c25863b202813422021-10-16 15:33:242 days 10 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0x9a65821fad14586a70be2077c010cc1b5dcccb3213cf8eb69775f05922b798a3202786452021-10-16 13:32:182 days 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0xc9f21608f704209ad536eaafa9bdfb21e811712c25757ff2a37729f93ed7d68f202785862021-10-16 13:26:402 days 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0xfa2bc002b6b64e8bebb8af259bd453324b4bc8c8e99f83f6ae2e2de1402706cd202783302021-10-16 13:17:522 days 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0xcac1dfa6f8bee9e41ece43ded78c9f752aee988feeea792396532bd0b0eb3a6a202777822021-10-16 12:50:302 days 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0x29e1da8365bb2a105fa2761c99bd8497642182eb5278f9aa13041b6f5a33c640202777752021-10-16 12:50:162 days 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0x09e8cea9e849814e8d5da1fdc58ac28b01b700cd70d8b559994400263f19157c202776412021-10-16 12:45:402 days 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0x1275771cbfe3afee537b95c35a3b2a0051f5d27ad29ab543a477eacaa7c7cee3202773122021-10-16 12:34:212 days 12 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0x6a48fe0ef719c9866f4faf5f32c6bccd1d21e61735fda29360c129935ac876ac202758332021-10-16 11:22:072 days 14 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.01 MATIC
0x45cb5e572e99e265bbe41669bdbd9e011773f426883f0b4b8a62da74c52b0dcb202753942021-10-16 11:03:532 days 14 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
0xf686e61dc046dc81ba968b70d2c05aa17dc58bf8e6244bba184231e222fc591d202753792021-10-16 11:03:132 days 14 hrs ago 0xc14769721abf735f26cc94949accdf9c263a98540xaed2a64dcda7bb2e0f85287ec53110f8c5c64fa00.02 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KiBridgeV1

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : KiBridgeV1.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../libs/token/ERC20//utils/SafeERC20.sol";
import "../libs/token/ERC20/IERC20.sol";
import "./interfaces/IKiBridgeV1Liquidity.sol";
import "./KiBridgeV1Factory.sol";
import "./KiLibrary.sol";

contract KiBridgeV1 is KiBridgeV1Factory, Ownable, ReentrancyGuard {
  using SafeERC20 for IERC20;

  uint256 constant public BASE_FEE = 0.01 ether;

  address public authorizedNode;
  bool public maintenance = true;

  mapping(address => KiLibrary.UserInfo) private userInfo;
  mapping(IERC20 => KiLibrary.TokenInfo) private tokenInfo;
  mapping(IERC20 => KiLibrary.LiquidityInfo) private liquidityInfo;
  mapping(uint256 => mapping(IERC20 => IERC20)) public fromChainTokenReceiveToken;

  function setFulfillmentPermission(
    address _node
  )
    external
    onlyOwner
  {
    authorizedNode = _node;
  }
  function setMaintenance(
    bool IsMaintenance
  )
    external
    onlyOwner
  {
    maintenance = IsMaintenance;
  }
  function setTokenFromChainInfo(
    IERC20 _token, 
    bytes4 _executeFunctionId,
    uint256 _fromChainId, 
    IERC20 _fromChainToken
  )
    external
    onlyOwner
  {
    KiLibrary.checkTokenOutFunctionId(_executeFunctionId);
    tokenInfo[_token].tokenOutFunctionId = _executeFunctionId;
    fromChainTokenReceiveToken[_fromChainId][_fromChainToken] = _token;
  }
  function setTokenToChainInfo(
    IERC20 _token, 
    bool _liquidable,
    bytes4 _tokenInFunctionId, 
    uint256 _toChainId, 
    IERC20 _toChainToken
  )
    external
    onlyOwner
  {
    require(_toChainId != block.chainid, "Wrong chainId");
    KiLibrary.checkTokenInFunctionId(_tokenInFunctionId);
    tokenInfo[_token].liquidable = _liquidable;
    tokenInfo[_token].tokenInFunctionId = _tokenInFunctionId;
    tokenInfo[_token].toChainToken[_toChainId] = _toChainToken;
  }
  function liquidityFromChain(
    IERC20 _token,
    uint256 _chainId,
    uint256 _amount
  ) 
    private 
  {
    KiLibrary.liquidityFromChainHelper(liquidityInfo[_token], _chainId, _amount);
  }
  function liquidityToChain(
    IERC20 _token,
    uint256 _chainId,
    uint256 _amount
  ) 
    private
  {
    KiLibrary.liquidityToChainHelper(liquidityInfo[_token], _chainId, _amount);
  }
  function oracleRequest(
    bytes32 _specId,
    address _user,
    address _callbackAddress,
    bytes4 _callbackFunctionId,
    uint256 _fromChainId,
    uint256 _toChainId, 
    uint256 _txIndex, 
    bytes memory _data
  )
    private
    checkBaseFee(2)
    checkAddress(authorizedNode)
  {
    KiLibrary.checkMaintenance(maintenance);
    bytes32 requestId = keccak256(abi.encodePacked(_user, userInfo[_user].nonce));
    // solhint-disable-next-line not-rely-on-time
    uint256 expiration = block.timestamp + 5 minutes;
    userInfo[_user].nonce += 1;
    require(userInfo[_user].commitments[requestId] == 0, "Must use a unique ID");
    userInfo[_user].commitments[requestId] = keccak256(abi.encode(_callbackFunctionId,_fromChainId, _toChainId, _txIndex));
    payable(authorizedNode).transfer(address(this).balance);
    emit KiLibrary.OracleRequest(
      _specId,
      _user,
      requestId,
      msg.value,
      _callbackAddress,
      _callbackFunctionId,
      expiration,
      KiLibrary.ARGS_VERSION,
      _data);
  }
  function oracleLiquidityRequest(
    bytes32 _specId,
    address _callbackAddress,
    bytes4 _callbackFunctionId,
    IERC20 _token,
    uint256 _toChainId,
    uint256 _amount,
    bool _isRemoveLiq,
    bytes memory _data
  )
    private
    checkBaseFee(1)
    checkAddress(authorizedNode)
  {
    KiLibrary.checkMaintenance(maintenance);
    bytes32 requestId = keccak256(abi.encodePacked(msg.sender, userInfo[msg.sender].nonce));
    // solhint-disable-next-line not-rely-on-time
    uint256 expiration = block.timestamp + 5 minutes;
    userInfo[msg.sender].nonce += 1;
    require(userInfo[msg.sender].requestData[requestId].params == 0, "Must use a unique ID");
    userInfo[msg.sender].pendingToChainRequestId[_toChainId] = requestId;
    userInfo[msg.sender].requestData[requestId] = KiLibrary.LiquidityRequest({ 
        requestId: requestId,
        params: keccak256(abi.encode(_callbackAddress, _callbackFunctionId, expiration)),
        expiration: expiration,
        token: _token,
        toChainId: _toChainId,
        amount: _amount,
        isRemoveLiq: _isRemoveLiq,
        isSuccess: false
      });
    payable(authorizedNode).transfer(address(this).balance);
    emit KiLibrary.OracleRequest(
      _specId,
      msg.sender,
      requestId,
      msg.value,
      _callbackAddress,
      _callbackFunctionId,
      expiration,
      KiLibrary.ARGS_VERSION,
      _data);
  }
  function cancelLiquidityRequest(
    bytes32 _requestId,
    uint256 _toChainId
  ) 
    external
    nonReentrant
  {
    require(userInfo[msg.sender].pendingToChainRequestId[_toChainId] == _requestId, "RequestId not in pendingQueue");
    KiLibrary.LiquidityRequest memory liquidityRequest = userInfo[msg.sender].requestData[_requestId];
    require(liquidityRequest.params != 0, "Must have params");
    // solhint-disable-next-line not-rely-on-time
    require(liquidityRequest.expiration <= block.timestamp, "Request is not expired");
    delete userInfo[msg.sender].pendingToChainRequestId[_toChainId];
    liquidityFromChain(liquidityRequest.token,liquidityRequest.toChainId,liquidityRequest.amount);
    if (liquidityRequest.isRemoveLiq) {
      userInfo[msg.sender].pendingLiquidityBalance[liquidityRequest.token] -= liquidityRequest.amount;
      liquidityInfo[liquidityRequest.token].toAllChainableBalance += liquidityRequest.amount;
      IKiBridgeV1Liquidity(getLiquidity[liquidityRequest.token]).mint(msg.sender, liquidityRequest.amount);
    } else {
      userInfo[msg.sender].pendingTokenBalance[liquidityRequest.token] -= liquidityRequest.amount;
      uint256 decimalsAmount = KiLibrary.tonkenOutDecimalsAmount(liquidityRequest.token, liquidityRequest.amount);
      liquidityRequest.token.safeTransfer(msg.sender, decimalsAmount);
    }
  }
  function fulfillTransaction(
    bytes32 _requestId, 
    bytes4 _fulfillFunctionId,
    address _user,
    uint256 _fromChainId,
    uint256 _toChainId, 
    uint256 _txIndex, 
    IERC20 _sendToken,
    uint256 _amount,
    IERC20 _receiveToken,
    bool _isRemoveLiq
  ) 
    external 
    onlyAuthorizedNode
  {
    require(
      userInfo[_user].commitments[_requestId] == keccak256(abi.encode(_fulfillFunctionId,_fromChainId, _toChainId, _txIndex)),
       "Params do not match request ID"
    );
    require(
      userInfo[_user].transactions[_fromChainId][_toChainId].length == _txIndex,
       "Transactions index out of order"
    );
    require(_toChainId == block.chainid, "Wrong chainId");
    delete userInfo[_user].commitments[_requestId];
    _receiveToken = fromChainTokenReceiveToken[_fromChainId][_sendToken];
    userInfo[_user].transactions[_fromChainId][_toChainId].push(
      KiLibrary.Transaction({
        sendToken: _sendToken,
        amount: _amount,
        receiveToken: _receiveToken,
        isRemoveLiq: _isRemoveLiq
      })
    );
    userInfo[_user].tokenBalance[_receiveToken] += _amount;
    if (tokenInfo[_receiveToken].liquidable) {
      liquidityFromChain(_receiveToken,_fromChainId,_amount);
    }
    if (tokenInfo[_receiveToken].tokenOutFunctionId == this.tokenOutTransferToUser.selector) {
      tokenOutTransferToUser(_user,_receiveToken,_amount);
    } else if (tokenInfo[_receiveToken].tokenOutFunctionId == this.tokenOutMintToUser.selector) {
      tokenOutMintToUser(_user,_receiveToken,_amount);
    }
    emit KiLibrary.FulfilledTransaction(
      _user, 
      _fromChainId, 
      _toChainId, 
      _sendToken, 
      _receiveToken, 
      _amount
    );
  }
  function fulfillLiquidity(
    bytes32 _requestId, 
    bytes4 _fulfillFunctionId,
    address _user,
    uint256 _expiration, 
    uint256 _calAmount,
    bytes calldata _data
  ) 
    external 
    onlyAuthorizedNode
  {
    (uint256 fromChainId, uint256 toChainId, IERC20 token, uint256 amount) = abi.decode(
      _data, (uint256, uint256, IERC20, uint256));
    require(userInfo[_user].pendingToChainRequestId[toChainId] == _requestId, "RequestId not in pendingQueue");
    require(
      userInfo[_user].requestData[_requestId].params == keccak256(
        abi.encode(address(this),_fulfillFunctionId, _expiration)),
       "Params do not match request ID"
    );
    delete userInfo[_user].pendingToChainRequestId[toChainId];
    delete userInfo[_user].requestData[_requestId].params;
    uint256 refund = amount - _calAmount;
    if (toChainId != block.chainid) liquidityFromChain(token,toChainId,refund);
    if (userInfo[_user].requestData[_requestId].isRemoveLiq) {
      userInfo[_user].pendingLiquidityBalance[token] -= amount;
      liquidityInfo[token].toAllChainableBalance += refund;
      if (refund > 0) IKiBridgeV1Liquidity(getLiquidity[token]).mint(_user, refund);
    } else {
      userInfo[_user].pendingTokenBalance[token] -= amount;
      refund = KiLibrary.tonkenOutDecimalsAmount(token, refund);
      if (refund > 0) token.safeTransfer(_user, refund);
    }
    if (_calAmount == 0) {
      userInfo[_user].requestData[_requestId].isSuccess = false;
      return;
    }
    if (toChainId == block.chainid) {
      _calAmount = KiLibrary.tonkenOutDecimalsAmount(token, _calAmount);
      token.safeTransfer(_user, _calAmount);
    } else {
      (,,KiLibrary.Transaction memory transaction) = abi.decode(_data, (uint256, uint256, KiLibrary.Transaction));
      transaction.amount = _calAmount;
      userInfo[_user].transactions[fromChainId][toChainId].push(transaction);
    }
    userInfo[_user].requestData[_requestId].isSuccess = true;
  }
  function tokenInTransferToChain(
    uint256 _toChainId, 
    IERC20 _token, 
    uint256 _amount
  ) 
    private 
    checkBaseFee(1)
    checkAddress(address(tokenInfo[_token].toChainToken[_toChainId]))
  {
    KiLibrary.checkMaintenance(maintenance);
    KiLibrary.checkAmount(_amount);
    userInfo[msg.sender].transactions[block.chainid][_toChainId].push(
      KiLibrary.Transaction({
        sendToken: _token,
        amount: _amount,
        receiveToken: tokenInfo[_token].toChainToken[_toChainId],
        isRemoveLiq: false
      })
    );
  }
  function tokenInReqTransferToChainAddLiq(
    uint256 _toChainId, 
    IERC20 _token, 
    uint256 _amount
  ) 
    external 
    payable
    checkAddress(address(tokenInfo[_token].toChainToken[_toChainId]))
    nonReentrant
  {
    KiLibrary.checkAmount(_amount);
    KiLibrary.tokenInCheck(tokenInfo[_token], this.tokenInReqTransferToChainAddLiq.selector);
    require(_toChainId != block.chainid, "Wrong chainId");
    require(userInfo[msg.sender].pendingToChainRequestId[_toChainId] == 0, "number of requests exceeded");
    _amount = realTonkenTransferAmount(_token,address(this),_amount);
    userInfo[msg.sender].pendingTokenBalance[_token] += _amount;
    bytes memory data = abi.encode(
      block.chainid, 
      _toChainId,
      KiLibrary.Transaction({
        sendToken: _token,
        amount: _amount,
        receiveToken: tokenInfo[_token].toChainToken[_toChainId],
        isRemoveLiq: false
      }),
      liquidityInfo[_token].fulfilledLiquidityFromChain[_toChainId],
      liquidityInfo[_token].pendingLiquidityToChain[_toChainId]
    );
    liquidityToChain(_token,_toChainId,_amount);
    oracleLiquidityRequest(
      KiLibrary.REQUEST_SPECID,  
      address(this), 
      this.fulfillLiquidity.selector, 
      _token, 
      _toChainId,
      _amount, 
      false,
      data
    );
  }
  function liquidityInRemoveToChain(
    uint256 _toChainId, 
    IERC20 _token, 
    uint256 _amount
  ) 
    private 
  {
    require(userInfo[msg.sender].pendingToChainRequestId[_toChainId] == 0, "number of requests exceeded");
    userInfo[msg.sender].pendingLiquidityBalance[_token] += _amount;
    bytes32 specId;
    bytes memory data;
    if (_toChainId == block.chainid) {
      specId = KiLibrary.REMOVE_SPECID;
      data = abi.encode(
        block.chainid, 
        block.chainid, 
        _token,
        _amount
      );
    } else {
      specId = KiLibrary.REQUEST_SPECID;
      data = abi.encode(
        block.chainid, 
        _toChainId,
        KiLibrary.Transaction({
          sendToken: _token,
          amount: _amount,
          receiveToken: tokenInfo[_token].toChainToken[_toChainId],
          isRemoveLiq: true
        }),
        liquidityInfo[_token].fulfilledLiquidityFromChain[_toChainId],
        liquidityInfo[_token].pendingLiquidityToChain[_toChainId]
      );
      liquidityToChain(_token,_toChainId,_amount);
    }
    oracleLiquidityRequest(
      specId,  
      address(this), 
      this.fulfillLiquidity.selector, 
      _token, 
      _toChainId,
      _amount, 
      true,
      data
    );
  }
  function synTransaction(
    address _user,
    uint256 _synChainId,
    uint256 _txIndex
  ) 
    external 
    payable
    onlyNodeOrUser(_user)
  {
    require(
      userInfo[_user].transactions[_synChainId][block.chainid].length == _txIndex,
       "Transactions index out of order"
    );
    bytes memory data = abi.encode(_synChainId, block.chainid, _txIndex);
    oracleRequest(
      KiLibrary.SYN_SPECID, 
      _user,
      address(this), 
      this.fulfillTransaction.selector, 
      _synChainId,
      block.chainid,
      _txIndex,
      data);
  }

  function addLiquidity(
    IERC20 _token, 
    uint256 _amount
  ) 
    external 
    nonReentrant
  {
    KiLibrary.checkMaintenance(maintenance);
    KiLibrary.checkAmount(_amount);
    require(tokenInfo[_token].liquidable, "Not liquidable");
    _amount = realTonkenTransferAmount(_token,address(this),_amount);
    liquidityInfo[_token].toAllChainableBalance += _amount;
    if (getLiquidity[_token] == address(0)) { 
      createLiquidity(_token); 
    }
    IKiBridgeV1Liquidity(getLiquidity[_token]).mint(msg.sender, _amount);
  }
  function removeLiquidity(
    uint256 _toChainId,
    IERC20 _token,
    uint256 _amount
  ) 
    public
    payable
    nonReentrant
  {
    KiLibrary.checkAmount(_amount);
    require(tokenInfo[_token].liquidable, "Not liquidable");
    IKiBridgeV1Liquidity(getLiquidity[_token]).burnFrom(msg.sender, _amount);
    liquidityInfo[_token].toAllChainableBalance -= _amount;
    liquidityInRemoveToChain(_toChainId, _token, _amount);
  }
  function removeLiquidityWithPermit(
    uint256 _toChainId,
    IERC20 _token,
    uint256 _amount,
    uint256 _deadline,
    uint8 _v, 
    bytes32 _r, 
    bytes32 _s
  ) 
    external 
    payable
  {
    IERC20Permit(getLiquidity[_token]).permit(msg.sender, address(this), _amount, _deadline, _v, _r, _s);
    removeLiquidity(_toChainId, _token, _amount);
  }
  function tokenInBridgeToChain(
    uint256 _toChainId,
    IERC20 _token, 
    uint256 _amount
  ) 
    external 
    payable
    nonReentrant
  {
    KiLibrary.tokenInCheck(tokenInfo[_token], this.tokenInBridgeToChain.selector);
    _amount = realTonkenTransferAmount(_token,address(this),_amount);
    tokenInTransferToChain(_toChainId, _token, _amount);
  }
  function tokenInBurnToChain(
    uint256 _toChainId,
    IERC20 _token, 
    uint256 _amount
  ) 
    external 
    payable
    nonReentrant
  {
    KiLibrary.tokenInCheck(tokenInfo[_token], this.tokenInBurnToChain.selector);
    _amount = realTonkenTransferAmount(_token,address(this),_amount);
    IERC20(_token).burn(_amount);
    tokenInTransferToChain(_toChainId, _token, _amount);
  }
  function tokenInBurnFromToChain(
    uint256 _toChainId,
    IERC20 _token, 
    uint256 _amount
  ) 
    external 
    payable
    nonReentrant
  {
    KiLibrary.tokenInCheck(tokenInfo[_token], this.tokenInBurnFromToChain.selector);
    IERC20(_token).burnFrom(msg.sender,_amount);
    _amount = KiLibrary.tonkenInDecimalsAmount(_token,_amount);
    tokenInTransferToChain(_toChainId, _token, _amount);
  }
  function tokenInBurnToBurnAddrToChain(
    uint256 _toChainId,
    IERC20 _token, 
    uint256 _amount
  ) 
    external 
    payable
    nonReentrant
  {
    KiLibrary.tokenInCheck(tokenInfo[_token], this.tokenInBurnToBurnAddrToChain.selector);
    _amount = realTonkenTransferAmount(_token,KiLibrary.BURN_ADDRESS,_amount);
    tokenInTransferToChain(_toChainId, _token, _amount);
  }
  function realTonkenTransferAmount(
    IERC20 _token, 
    address _receiver,
    uint256 _amount
  ) 
    private 
    returns (uint256 realAmount)
  {
    uint256 balanceBefore = _token.balanceOf(_receiver);
    _token.safeTransferFrom(msg.sender, _receiver, _amount);
    _amount = _token.balanceOf(_receiver) - balanceBefore;
    realAmount = KiLibrary.tonkenInDecimalsAmount(_token,_amount);
  }
  function tokenOutTransferToUser(
    address _user, 
    IERC20 _token, 
    uint256 _amount
  ) 
    public 
    onlyNodeOrUser(_user)
    nonReentrant
  {
    userInfo[_user].tokenBalance[_token] -= _amount;
    _amount = KiLibrary.tonkenOutDecimalsAmount(_token,_amount);
    _token.safeTransfer(_user, _amount);
  }
  function tokenOutMintToUser(
    address _user, 
    IERC20 _token, 
    uint256 _amount
  ) 
    public 
    onlyNodeOrUser(_user)
    nonReentrant
  {
    userInfo[_user].tokenBalance[_token] -= _amount;
    _amount = KiLibrary.tonkenOutDecimalsAmount(_token,_amount);
    IERC20(_token).mint(_user, _amount);
  }
  function getUserTransaction(
    address _user, 
    uint256 _fromChainId, 
    uint256 _toChainId, 
    uint256 _txIndex
  ) 
    external 
    view 
    returns (KiLibrary.Transaction memory) 
  {
    return userInfo[_user].transactions[_fromChainId][_toChainId][_txIndex];
  }
  function getUserTransactionsLength(
    address _user, 
    uint256 _fromChainId, 
    uint256 _toChainId
  )
    external 
    view 
    returns (uint256 length) 
  {
    return userInfo[_user].transactions[_fromChainId][_toChainId].length;
  }
  function getToAllChainableBalance(
    IERC20 _token
  )
    external 
    view 
    returns (uint256 amount) 
  {
    return liquidityInfo[_token].toAllChainableBalance;
  }
  function calculateToAllChainableBalance(
    IERC20 _token,
    uint256 _fulfilled,
    uint256 _pending,
    uint256 _amount
  )
    external 
    view 
    returns (uint256 amount) 
  {
    if (liquidityInfo[_token].toAllChainableBalance + _fulfilled >= _pending + _amount) return _amount;
    else return 0;
  }
  function accumulatePendingLiquidityToChain(
    IERC20 _token,
    uint256 _toChainId,
    uint256 _amount
  )
    external 
    view 
    returns (uint256 amount) 
  {
    return liquidityInfo[_token].pendingLiquidityToChain[_toChainId] + _amount;
  }
  function accumulateFulfilledLiquidityFromChain(
    IERC20 _token,
    uint256 _chainId,
    uint256 _amount
  )
    external 
    view 
    returns (uint256 amount) 
  {
    return liquidityInfo[_token].fulfilledLiquidityFromChain[_chainId] + _amount;
  }
  function getUserNonce(
    address _user
  )
    external 
    view 
    returns (uint256 nonce) 
  {
    return userInfo[_user].nonce;
  }
  function getUserTokenBalance(
    address _user, 
    IERC20 _token
  )
    external 
    view 
    returns (uint256 amount) 
  {
    return userInfo[_user].tokenBalance[_token];
  }
  function getUserPendingLiquidityRequest(
    address _user,
    uint256 _toChainId
  )
    external 
    view 
    returns (KiLibrary.LiquidityRequest memory) 
  {
    bytes32 requestId = userInfo[_user].pendingToChainRequestId[_toChainId];
    return userInfo[_user].requestData[requestId];
  }
  function getUserLiquidityRequest(
    address _user,
    bytes32 _requestId
  )
    external 
    view 
    returns (KiLibrary.LiquidityRequest memory) 
  {
    return userInfo[_user].requestData[_requestId];
  }
  function getTokenInfo(
    IERC20 _token,  
    uint256 _toChainId
  )
    external 
    view 
    returns (
      bool liquidable,
      bytes4 tokenInFunctionId, 
      bytes4 executeFunctionId, 
      IERC20 toChainToken
    ) 
  {
    return (
      tokenInfo[_token].liquidable,
      tokenInfo[_token].tokenInFunctionId,
      tokenInfo[_token].tokenOutFunctionId,
      tokenInfo[_token].toChainToken[_toChainId]
    );
  }
  modifier checkBaseFee(uint256 _multiplier) {
    require(BASE_FEE * _multiplier <= msg.value, "Insufficient Base Fee");
    _;
  }
  modifier checkAddress(address _address) {
    require(_address != address(0), "Invalid address");
    _;
  }
  modifier onlyAuthorizedNode() {
    require(msg.sender == authorizedNode, "Not an authorized node");
    _;
  }
  modifier onlyNodeOrUser(address _user) {
    require(msg.sender == authorizedNode || msg.sender == _user, "Caller is not the node or user");
    _;
  }
}

File 2 of 20 : KiBridgeV1Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../libs/token/ERC20/IERC20.sol";
import "./interfaces/IKiBridgeV1Factory.sol";
import "./KiBridgeV1LiquidityDeployer.sol";
import "./KiBridgeV1Liquidity.sol";

contract KiBridgeV1Factory is IKiBridgeV1Factory, KiBridgeV1LiquidityDeployer {
  bytes32 public constant INIT_CODE_LIQ_HASH = keccak256(abi.encodePacked(type(KiBridgeV1Liquidity).creationCode));

  mapping(IERC20 => address) public getLiquidity;

  address[] public allLiquidities;

  function createLiquidity(
    IERC20 _token
  ) 
    public 
    override 
    returns (address liquidity)
  {
    require(getLiquidity[_token] == address(0), "Liquidity exists");
    liquidity = deploy(address(this), address(_token));
    getLiquidity[_token] = liquidity;
    allLiquidities.push(liquidity);
    emit LiquidityCreated(_token, liquidity, allLiquidities.length);
  }

}

File 3 of 20 : KiBridgeV1Liquidity.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/IKiBridgeV1LiquidityDeployer.sol";
import "./interfaces/IKiBridgeV1Liquidity.sol";
import "./KiERC20Permit.sol";

contract KiBridgeV1Liquidity is IKiBridgeV1Liquidity, KiERC20Permit {
  address public immutable override bridge;
  address public immutable override token;

  modifier onlyBridge() {
    require(bridge == _msgSender(), "caller is not the bridge");
    _;
  }

  constructor() KiERC20Permit("KiBridge V1 Liquidity", "KiB-V1-LIQ") {
    (bridge, token) = IKiBridgeV1LiquidityDeployer(msg.sender).parameters();
  }
  
  /// @notice Creates `_amount` token to `_to`. Must only be called by the bridge.
  function mint(address _to, uint256 _amount) public override onlyBridge {
    _mint(_to, _amount);
  }

  /**
    * @dev Destroys `amount` tokens from the caller.
    *
    * See {ERC20-_burn}.
    */
  function burn(uint256 amount) public override {
    _burn(_msgSender(), amount);
  }

  /**
    * @dev Destroys `amount` tokens from `account`, deducting from the caller's
    * allowance.
    *
    * See {ERC20-_burn} and {ERC20-allowance}.
    *
    * Requirements:
    *
    * - the caller must have allowance for ``accounts``'s tokens of at least
    * `amount`.
    */
  function burnFrom(address account, uint256 amount) public override {
    uint256 currentAllowance = allowance(account, _msgSender());
    require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
    unchecked {
        _approve(account, _msgSender(), currentAllowance - amount);
    }
    _burn(account, amount);
  }
}

File 4 of 20 : KiBridgeV1LiquidityDeployer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/IKiBridgeV1LiquidityDeployer.sol";
import "./KiBridgeV1Liquidity.sol";

contract  KiBridgeV1LiquidityDeployer is IKiBridgeV1LiquidityDeployer {

  struct Parameters {
    address bridge;
    address token;
  }

  Parameters public override parameters;

  function deploy(
    address _bridge,
    address _token
  ) 
  internal 
  returns (address liquidity) 
  {
    parameters = Parameters({bridge: _bridge, token: _token});
    liquidity = address(new KiBridgeV1Liquidity{salt: keccak256(abi.encode(_bridge, _token))}());
    delete parameters;
  }
}

File 5 of 20 : KiERC20Permit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "../libs/token/ERC20/ERC20.sol";

/**
 * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * _Available since v3.4._
 */
abstract contract KiERC20Permit is ERC20, IERC20Permit, EIP712 {
    using Counters for Counters.Counter;

    mapping(address => Counters.Counter) private _nonces;

    // solhint-disable-next-line var-name-mixedcase
    bytes32 private immutable _PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name, string memory symbol) ERC20(name,symbol) EIP712(name, "1") {}

    /**
     * @dev See {IERC20Permit-permit}.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        require(signer == owner, "ERC20Permit: invalid signature");

        _approve(owner, spender, value);
    }

    /**
     * @dev See {IERC20Permit-nonces}.
     */
    function nonces(address owner) public view virtual override returns (uint256) {
        return _nonces[owner].current();
    }

    /**
     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view override returns (bytes32) {
        return _domainSeparatorV4();
    }

    /**
     * @dev "Consume a nonce": return the current value and increment.
     *
     * _Available since v4.1._
     */
    function _useNonce(address owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[owner];
        current = nonce.current();
        nonce.increment();
    }
}

File 6 of 20 : KiLibrary.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../libs/token/ERC20/IERC20.sol";

library KiLibrary {

  address constant public BURN_ADDRESS = 0x000000000000000000000000000000000000dEaD;
  uint256 constant public ARGS_VERSION = 1;
  bytes32 constant public REQUEST_SPECID = 0x6266643464393434313764303439366261373335373564346462343139616136;
  bytes32 constant public SYN_SPECID = 0x3836313137383965303233343461316339643239653637343839616433393266;
  bytes32 constant public REMOVE_SPECID = 0x3031303763376236666434353439386462363465356636613831326133393164;

  struct UserInfo {
    uint256 nonce;
    mapping(bytes32 => bytes32) commitments;
    mapping(uint256 => mapping(uint256 => Transaction[])) transactions;
    mapping(IERC20 => uint256) tokenBalance;
    mapping(IERC20 => uint256) pendingTokenBalance;
    mapping(IERC20 => uint256) pendingLiquidityBalance;
    mapping(uint256 => bytes32) pendingToChainRequestId;
    mapping(bytes32 => LiquidityRequest) requestData;
  }
  struct TokenInfo {
    bool liquidable;
    bytes4 tokenInFunctionId;
    bytes4 tokenOutFunctionId;
    mapping(uint256 => IERC20) toChainToken;
  }
  struct LiquidityInfo {
    uint256 toAllChainableBalance;
    mapping(uint256 => uint256) pendingLiquidityToChain;
    mapping(uint256 => uint256) fulfilledLiquidityFromChain;
  }
  struct Transaction {
    IERC20 sendToken; 
    uint256 amount;
    IERC20 receiveToken;
    bool isRemoveLiq;
  }
  struct LiquidityRequest {
    bytes32 requestId;
    bytes32 params;
    uint256 expiration;
    IERC20 token;
    uint256 toChainId;
    uint256 amount;
    bool isRemoveLiq;
    bool isSuccess;
  }

  event OracleRequest(
    bytes32 indexed specId,
    address requester,
    bytes32 requestId,
    uint256 payment,
    address callbackAddr,
    bytes4 callbackFunctionId,
    uint256 cancelExpiration,
    uint256 dataVersion,
    bytes data
  );
  event FulfilledTransaction(
    address indexed user, 
    uint256 indexed fromChainId, 
    uint256 indexed toChainId, 
    IERC20 sendToken, 
    IERC20 receiveToken, 
    uint256 amount
  );

  function tonkenInDecimalsAmount(
    IERC20 _token, 
    uint256 _amount
  ) 
    internal 
    view
    returns (uint256 decimalsAmount)
  {
    uint8 decimals = IERC20(_token).decimals();
    decimalsAmount = _amount * 10**(18 - decimals);
  }

  function tonkenOutDecimalsAmount(
    IERC20 _token, 
    uint256 _amount
  ) 
    internal 
    view
    returns (uint256 decimalsAmount)
  {
    uint8 decimals = IERC20(_token).decimals();
    decimalsAmount = _amount / 10**(18 - decimals);
  }

  function liquidityFromChainHelper(
    LiquidityInfo storage _liquidityInfoToken,
    uint256 _chainId,
    uint256 _amount
  ) 
    internal 
  {
    if (_liquidityInfoToken.pendingLiquidityToChain[_chainId] >= _amount) {
      _liquidityInfoToken.pendingLiquidityToChain[_chainId] -= _amount;
    } else {
      _liquidityInfoToken.fulfilledLiquidityFromChain[_chainId] =
      _liquidityInfoToken.fulfilledLiquidityFromChain[_chainId] +
      _amount - _liquidityInfoToken.pendingLiquidityToChain[_chainId];
      _liquidityInfoToken.pendingLiquidityToChain[_chainId] = 0;
    }
  }
  
  function liquidityToChainHelper(
    LiquidityInfo storage _liquidityInfoToken,
    uint256 _chainId,
    uint256 _amount
  ) 
    internal
  {
    if (_liquidityInfoToken.fulfilledLiquidityFromChain[_chainId] >= _amount) {
      _liquidityInfoToken.fulfilledLiquidityFromChain[_chainId] -= _amount;
    } else {
      _liquidityInfoToken.pendingLiquidityToChain[_chainId] = 
      _liquidityInfoToken.pendingLiquidityToChain[_chainId] +
      _amount - _liquidityInfoToken.fulfilledLiquidityFromChain[_chainId];
      _liquidityInfoToken.fulfilledLiquidityFromChain[_chainId] = 0;
    }
  }

  function checkTokenInFunctionId(bytes4 _tokenInFunctionId) internal pure {
    require(
      _tokenInFunctionId == IKiBridge.tokenInReqTransferToChainAddLiq.selector ||
      _tokenInFunctionId == IKiBridge.tokenInBridgeToChain.selector ||
      _tokenInFunctionId == IKiBridge.tokenInBurnToChain.selector ||
      _tokenInFunctionId == IKiBridge.tokenInBurnFromToChain.selector ||
      _tokenInFunctionId == IKiBridge.tokenInBurnToBurnAddrToChain.selector,
       "Must use whitelisted functions"
    );
  }

  function checkTokenOutFunctionId(bytes4 _executeFunctionId) internal pure {
    require(
      _executeFunctionId == IKiBridge.tokenOutTransferToUser.selector ||
      _executeFunctionId == IKiBridge.tokenOutMintToUser.selector,
       "Must use whitelisted functions"
    );
  }

  function tokenInCheck(TokenInfo storage _tokenInfoToken, bytes4 _functionId) internal view {
    require(_tokenInfoToken.tokenInFunctionId == _functionId, "FunctionId Not Permitted");
  }

  function checkAmount(uint256 _amount) internal pure {
    require(_amount > 0,"Amount must be greater than zero");
  }
  function checkMaintenance(bool _maintenance) internal pure {
    require(!_maintenance, "KiBridge: Under maintenance");
  }
  function getWhitelistedFunctionId(
  )
    external 
    pure 
    returns (
      bytes4 tokenInReqTransferToChainAddLiqId, 
      bytes4 tokenInBridgeToChainId, 
      bytes4 tokenInBurnToChainId, 
      bytes4 tokenInBurnFromToChainId, 
      bytes4 tokenInBurnToBurnAddrToChainId, 
      bytes4 tokenOutTransferToUserId, 
      bytes4 tokenOutMintToUserId
    ) 
  {
    return (
      IKiBridge.tokenInReqTransferToChainAddLiq.selector,
      IKiBridge.tokenInBridgeToChain.selector,
      IKiBridge.tokenInBurnToChain.selector,
      IKiBridge.tokenInBurnFromToChain.selector,
      IKiBridge.tokenInBurnToBurnAddrToChain.selector,
      IKiBridge.tokenOutTransferToUser.selector,
      IKiBridge.tokenOutMintToUser.selector
    );
  }
}

interface IKiBridge {

  function tokenInReqTransferToChainAddLiq(
    uint256 toChainId, 
    IERC20 token, 
    uint256 amount
  ) external ;

  function tokenInBridgeToChain(
    uint256 toChainId,
    IERC20 token, 
    uint256 amount
  ) external ;

  function tokenInBurnToChain(
    uint256 toChainId,
    IERC20 token, 
    uint256 amount
  ) external ;

  function tokenInBurnFromToChain(
    uint256 toChainId,
    IERC20 token, 
    uint256 amount
  ) external ;

  function tokenInBurnToBurnAddrToChain(
    uint256 toChainId,
    IERC20 token, 
    uint256 amount
  ) external ;

  function tokenOutTransferToUser(
    address _user, 
    IERC20 _token, 
    uint256 _amount
  ) external ;

  function tokenOutMintToUser(
    address _user, 
    IERC20 _token, 
    uint256 _amount
  ) external ;

}

File 7 of 20 : IKiBridgeV1Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../../libs/token/ERC20/IERC20.sol";

interface IKiBridgeV1Factory {

  event LiquidityCreated(IERC20 indexed token, address indexed liquidity, uint);

  function createLiquidity(IERC20 _token) external returns (address liquidity);
  
}

File 8 of 20 : IKiBridgeV1Liquidity.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../../libs/token/ERC20/IERC20.sol";

interface IKiBridgeV1Liquidity is IERC20 {

  function bridge() external view returns (address);

  function token() external view returns (address);
}

File 9 of 20 : IKiBridgeV1LiquidityDeployer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IKiBridgeV1LiquidityDeployer {

  function parameters() external view returns (address bridge, address token);
  
}

File 10 of 20 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Context.sol";
import "./IERC20.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
abstract contract ERC20 is Context, IERC20 {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 11 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IERC20 {
  
    function mint(address to, uint256 amount) external;
    function burn(uint256 amount) external;
    function burnFrom(address account, uint256 amount) external;

    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 account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 12 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Address.sol";
import "../IERC20.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 13 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 14 of 20 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 15 of 20 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 16 of 20 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 17 of 20 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 18 of 20 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 19 of 20 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 20 of 20 : draft-EIP712.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "london",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"liquidity","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"LiquidityCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"BASE_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INIT_CODE_LIQ_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"accumulateFulfilledLiquidityFromChain","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"accumulatePendingLiquidityToChain","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allLiquidities","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"authorizedNode","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_fulfilled","type":"uint256"},{"internalType":"uint256","name":"_pending","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"calculateToAllChainableBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"uint256","name":"_toChainId","type":"uint256"}],"name":"cancelLiquidityRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"createLiquidity","outputs":[{"internalType":"address","name":"liquidity","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"contract IERC20","name":"","type":"address"}],"name":"fromChainTokenReceiveToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"bytes4","name":"_fulfillFunctionId","type":"bytes4"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_expiration","type":"uint256"},{"internalType":"uint256","name":"_calAmount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"fulfillLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"bytes4","name":"_fulfillFunctionId","type":"bytes4"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_fromChainId","type":"uint256"},{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"uint256","name":"_txIndex","type":"uint256"},{"internalType":"contract IERC20","name":"_sendToken","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"contract IERC20","name":"_receiveToken","type":"address"},{"internalType":"bool","name":"_isRemoveLiq","type":"bool"}],"name":"fulfillTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"getLiquidity","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"getToAllChainableBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_toChainId","type":"uint256"}],"name":"getTokenInfo","outputs":[{"internalType":"bool","name":"liquidable","type":"bool"},{"internalType":"bytes4","name":"tokenInFunctionId","type":"bytes4"},{"internalType":"bytes4","name":"executeFunctionId","type":"bytes4"},{"internalType":"contract IERC20","name":"toChainToken","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes32","name":"_requestId","type":"bytes32"}],"name":"getUserLiquidityRequest","outputs":[{"components":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bytes32","name":"params","type":"bytes32"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"toChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isRemoveLiq","type":"bool"},{"internalType":"bool","name":"isSuccess","type":"bool"}],"internalType":"struct KiLibrary.LiquidityRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_toChainId","type":"uint256"}],"name":"getUserPendingLiquidityRequest","outputs":[{"components":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"bytes32","name":"params","type":"bytes32"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"toChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isRemoveLiq","type":"bool"},{"internalType":"bool","name":"isSuccess","type":"bool"}],"internalType":"struct KiLibrary.LiquidityRequest","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"getUserTokenBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_fromChainId","type":"uint256"},{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"uint256","name":"_txIndex","type":"uint256"}],"name":"getUserTransaction","outputs":[{"components":[{"internalType":"contract IERC20","name":"sendToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"contract IERC20","name":"receiveToken","type":"address"},{"internalType":"bool","name":"isRemoveLiq","type":"bool"}],"internalType":"struct KiLibrary.Transaction","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_fromChainId","type":"uint256"},{"internalType":"uint256","name":"_toChainId","type":"uint256"}],"name":"getUserTransactionsLength","outputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maintenance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"parameters","outputs":[{"internalType":"address","name":"bridge","type":"address"},{"internalType":"address","name":"token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"removeLiquidity","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_node","type":"address"}],"name":"setFulfillmentPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"IsMaintenance","type":"bool"}],"name":"setMaintenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bytes4","name":"_executeFunctionId","type":"bytes4"},{"internalType":"uint256","name":"_fromChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_fromChainToken","type":"address"}],"name":"setTokenFromChainInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_liquidable","type":"bool"},{"internalType":"bytes4","name":"_tokenInFunctionId","type":"bytes4"},{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_toChainToken","type":"address"}],"name":"setTokenToChainInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_synChainId","type":"uint256"},{"internalType":"uint256","name":"_txIndex","type":"uint256"}],"name":"synTransaction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenInBridgeToChain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenInBurnFromToChain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenInBurnToBurnAddrToChain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenInBurnToChain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_toChainId","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenInReqTransferToChainAddLiq","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenOutMintToUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"tokenOutTransferToUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526006805460ff60a01b1916600160a01b1790553480156200002457600080fd5b5062000030336200003b565b60016005556200008d565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b615fd5806200009d6000396000f3fe608060405260043610620002775760003560e01c8063890357301162000153578063bbd7d20911620000c5578063dfb918db1162000084578063dfb918db1462000914578063e740f822146200092c578063f2fde38b1462000951578063fbbe32f21462000976578063fbf9bd18146200099b578063fcb2b8ac14620009c057600080fd5b8063bbd7d2091462000802578063c4ccdeea14620008aa578063d28ad6bd14620008c1578063d442e6ec14620008d8578063da529e8414620008fd57600080fd5b8063a140c66d1162000112578063a140c66d1462000733578063a3d1a1351462000758578063a747b93b146200076f578063a8d275bc14620007a9578063b030a1cf14620007dd57600080fd5b80638903573014620006685780638af00ba014620006b25780638da5cb5b14620006c957806396a4beaa14620006e9578063986909e5146200070e57600080fd5b80634071465811620001ed57806368dbe7d011620001ac57806368dbe7d014620005285780636b3fba7e146200053f5780636c376cc514620005ce578063715018a6146200060257806373f8fd4b146200061a57600080fd5b8063407146581462000468578063491cec0c146200047f5780635668870014620004a4578063612f2f3714620004c95780636834e3a814620004ee57600080fd5b80632622773e116200023a5780632622773e146200039557806326b46b8a14620003ea5780632d12049b146200040f5780633af9311814620004265780633d18651e146200044b57600080fd5b806302afb8a0146200027c5780630a34e19814620002de5780630ab14583146200031257806323d43471146200033457806325640ccd146200035b575b600080fd5b3480156200028957600080fd5b50620002c16200029b36600462003d4b565b600a6020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b348015620002eb57600080fd5b5062000303620002fd36600462003d7e565b620009e5565b604051908152602001620002d5565b3480156200031f57600080fd5b50600654620002c1906001600160a01b031681565b3480156200034157600080fd5b50620003596200035336600462003deb565b62000a23565b005b3480156200036857600080fd5b50620003036200037a36600462003e5a565b6001600160a01b031660009081526009602052604090205490565b348015620003a257600080fd5b5062000303620003b436600462003d7e565b6001600160a01b038316600090815260076020908152604080832085845260020182528083208484529091529020549392505050565b348015620003f757600080fd5b50620003596200040936600462003e5a565b62000af1565b620003596200042036600462003e7a565b62000b40565b3480156200043357600080fd5b50620003036200044536600462003d7e565b62000bbc565b3480156200045857600080fd5b5062000303662386f26fc1000081565b620003596200047936600462003e7a565b62000bf0565b3480156200048c57600080fd5b50620003596200049e36600462003eb5565b62000e5d565b348015620004b157600080fd5b5062000359620004c336600462003f0d565b62000efb565b348015620004d657600080fd5b5062000359620004e836600462003f3c565b62001090565b348015620004fb57600080fd5b50620003036200050d36600462003e5a565b6001600160a01b031660009081526007602052604090205490565b620003596200053936600462003d7e565b620010db565b3480156200054c57600080fd5b50620005646200055e36600462003f0d565b6200120f565b604051620002d591908151815260208083015190820152604080830151908201526060808301516001600160a01b0316908201526080808301519082015260a0808301519082015260c08083015115159082015260e0918201511515918101919091526101000190565b348015620005db57600080fd5b50600654620005f190600160a01b900460ff1681565b6040519015158152602001620002d5565b3480156200060f57600080fd5b5062000359620012b8565b3480156200062757600080fd5b50620003036200063936600462003f5c565b6001600160a01b0391821660009081526007602090815260408083209390941682526003909201909152205490565b3480156200067557600080fd5b5060005460015462000691916001600160a01b03908116911682565b604080516001600160a01b03938416815292909116602083015201620002d5565b62000359620006c336600462003e7a565b620012f3565b348015620006d657600080fd5b506004546001600160a01b0316620002c1565b348015620006f657600080fd5b50620003596200070836600462003f8f565b62001358565b3480156200071b57600080fd5b50620005646200072d36600462003f0d565b62001488565b3480156200074057600080fd5b50620003596200075236600462003f8f565b62001525565b620003596200076936600462003e7a565b62001605565b3480156200077c57600080fd5b50620002c16200078e36600462003e5a565b6002602052600090815260409020546001600160a01b031681565b348015620007b657600080fd5b50620007ce620007c836600462003fc4565b620016c9565b604051620002d5919062004002565b348015620007ea57600080fd5b50620002c1620007fc36600462003e5a565b6200178a565b3480156200080f57600080fd5b506200086d6200082136600462003f0d565b6001600160a01b039182166000908152600860209081526040808320805494845260010190915290205460ff821693610100830460e090811b94600160281b909404901b929190911690565b604051620002d5949392919093151584526001600160e01b03199283166020850152911660408301526001600160a01b0316606082015260800190565b62000359620008bb36600462003e7a565b620018a8565b62000359620008d236600462003e7a565b620019eb565b348015620008e557600080fd5b5062000303620008f736600462003fc4565b62001aba565b620003596200090e3660046200404e565b62001b05565b3480156200092157600080fd5b506200030362001bb4565b3480156200093957600080fd5b50620003596200094b366004620040bb565b62001c02565b3480156200095e57600080fd5b50620003596200097036600462003e5a565b62002187565b3480156200098357600080fd5b50620003596200099536600462004177565b62002229565b348015620009a857600080fd5b50620002c1620009ba36600462004223565b620025fd565b348015620009cd57600080fd5b5062000359620009df3660046200423d565b62002628565b6001600160a01b038316600090815260096020908152604080832085845260010190915281205462000a1990839062004276565b90505b9392505050565b6004546001600160a01b0316331462000a595760405162461bcd60e51b815260040162000a509062004291565b60405180910390fd5b4682141562000a7c5760405162461bcd60e51b815260040162000a5090620042c6565b62000a8783620029ac565b6001600160a01b039485166000908152600860209081526040808320805464ffffffffff191697151564ffffffff0019169790971761010060e09790971c969096029590951786559281526001909401909152912080546001600160a01b03191691909216179055565b6004546001600160a01b0316331462000b1e5760405162461bcd60e51b815260040162000a509062004291565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6002600554141562000b665760405162461bcd60e51b815260040162000a5090620042ed565b60026005556001600160a01b038216600090815260086020526040902062000b9690632d12049b60e01b62002a7e565b62000ba382308362002ae9565b905062000bb283838362002c27565b5050600160055550565b6001600160a01b038316600090815260096020908152604080832085845260020190915281205462000a1990839062004276565b6001600160a01b038083166000908152600860209081526040808320878452600101909152902054168062000c395760405162461bcd60e51b815260040162000a509062004324565b6002600554141562000c5f5760405162461bcd60e51b815260040162000a5090620042ed565b600260055562000c6f8262002d96565b6001600160a01b038316600090815260086020526040902062000c9a9063080e28cb60e31b62002a7e565b4684141562000cbd5760405162461bcd60e51b815260040162000a5090620042c6565b3360009081526007602090815260408083208784526006019091529020541562000d2a5760405162461bcd60e51b815260206004820152601b60248201527f6e756d626572206f662072657175657374732065786365656465640000000000604482015260640162000a50565b62000d3783308462002ae9565b3360009081526007602090815260408083206001600160a01b038816845260040190915281208054929450849290919062000d7490849062004276565b9091555050604080516080810182526001600160a01b0385811680835260208084018790526000828152600882528581208a825260019081018352868220549094168587015260608501819052918252600981528482208983526002810182528583205493018152848220549451919462000df99446948b949193909291016200434d565b604051602081830303815290604052905062000e1784868562002de8565b62000e517f6266643464393434313764303439366261373335373564346462343139616136306373a07c1160e11b87898860008862002e12565b50506001600555505050565b6004546001600160a01b0316331462000e8a5760405162461bcd60e51b815260040162000a509062004291565b62000e958362003137565b6001600160a01b039384166000818152600860209081526040808320805460e09890981c600160281b0268ffffffff00000000001990981697909717909655938152600a84528481209290951685529152912080546001600160a01b0319169091179055565b6002600554141562000f215760405162461bcd60e51b815260040162000a5090620042ed565b600260055560065462000f3e90600160a01b900460ff16620031b4565b62000f498162002d96565b6001600160a01b03821660009081526008602052604090205460ff1662000fa45760405162461bcd60e51b815260206004820152600e60248201526d4e6f74206c697175696461626c6560901b604482015260640162000a50565b62000fb182308362002ae9565b6001600160a01b03831660009081526009602052604081208054929350839290919062000fe090849062004276565b90915550506001600160a01b0382811660009081526002602052604090205416620010125762001010826200178a565b505b6001600160a01b03828116600090815260026020526040908190205490516340c10f1960e01b8152336004820152602481018490529116906340c10f1990604401600060405180830381600087803b1580156200106e57600080fd5b505af115801562001083573d6000803e3d6000fd5b5050600160055550505050565b6004546001600160a01b03163314620010bd5760405162461bcd60e51b815260040162000a509062004291565b60068054911515600160a01b0260ff60a01b19909216919091179055565b60065483906001600160a01b0316331480620010ff5750336001600160a01b038216145b6200111e5760405162461bcd60e51b815260040162000a5090620043ab565b6001600160a01b0384166000908152600760209081526040808320868452600201825280832046845290915290205482146200119d5760405162461bcd60e51b815260206004820152601f60248201527f5472616e73616374696f6e7320696e646578206f7574206f66206f7264657200604482015260640162000a50565b604080516020810185905246918101919091526060810183905260009060800160408051601f198184030181529190529050620012087f38363131373839653032333434613163396432396536373438396164333932668630637ddf197960e11b8846898862003204565b5050505050565b6200121962003cd1565b506001600160a01b03808316600090815260076020818152604080842086855260068082018452828620548652930182529283902083516101008082018652825482526001830154938201939093526002820154948101949094526003810154909416606084015260048401546080840152600584015460a084015292015460ff808216151560c0840152929004909116151560e08201525b92915050565b6004546001600160a01b03163314620012e55760405162461bcd60e51b815260040162000a509062004291565b620012f1600062003493565b565b60026005541415620013195760405162461bcd60e51b815260040162000a5090620042ed565b60026005556001600160a01b03821660009081526008602052604090206200134990630457805d60e51b62002a7e565b62000ba38261dead8362002ae9565b60065483906001600160a01b03163314806200137c5750336001600160a01b038216145b6200139b5760405162461bcd60e51b815260040162000a5090620043ab565b60026005541415620013c15760405162461bcd60e51b815260040162000a5090620042ed565b60026005556001600160a01b038085166000908152600760209081526040808320938716835260039093019052908120805484929062001403908490620043e2565b909155506200141590508383620034e5565b6040516340c10f1960e01b81526001600160a01b03868116600483015260248201839052919350908416906340c10f1990604401600060405180830381600087803b1580156200146457600080fd5b505af115801562001479573d6000803e3d6000fd5b50506001600555505050505050565b6200149262003cd1565b506001600160a01b03808316600090815260076020818152604080842086855290920181529181902081516101008082018452825482526001830154948201949094526002820154928101929092526003810154909316606082015260048301546080820152600583015460a082015260069092015460ff808216151560c085015291900416151560e082015292915050565b60065483906001600160a01b0316331480620015495750336001600160a01b038216145b620015685760405162461bcd60e51b815260040162000a5090620043ab565b600260055414156200158e5760405162461bcd60e51b815260040162000a5090620042ed565b60026005556001600160a01b0380851660009081526007602090815260408083209387168352600390930190529081208054849290620015d0908490620043e2565b90915550620015e290508383620034e5565b9150620015fa6001600160a01b038416858462003585565b505060016005555050565b600260055414156200162b5760405162461bcd60e51b815260040162000a5090620042ed565b60026005556001600160a01b03821660009081526008602052604090206200165b9063a3d1a13560e01b62002a7e565b60405163079cc67960e41b8152336004820152602481018290526001600160a01b038316906379cc679090604401600060405180830381600087803b158015620016a457600080fd5b505af1158015620016b9573d6000803e3d6000fd5b5050505062000ba38282620035ea565b6040805160808101825260008082526020808301829052828401829052606083018290526001600160a01b0388168252600781528382208783526002018152838220868352905291909120805483908110620017295762001729620043fc565b60009182526020918290206040805160808101825260039390930290910180546001600160a01b0390811684526001820154948401949094526002015492831690820152600160a01b90910460ff161515606082015290505b949350505050565b6001600160a01b0381811660009081526002602052604081205490911615620017e95760405162461bcd60e51b815260206004820152601060248201526f4c69717569646974792065786973747360801b604482015260640162000a50565b620017f530836200368a565b6001600160a01b0380841660008181526002602052604080822080549486166001600160a01b0319958616811790915560038054600181018255938190527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9093018054909516811790945590549051939450919290917f34808462cbbce93b0f28456a3130fbe956d0312daf709e13ca0d805aaeafa83e916200189b91815260200190565b60405180910390a3919050565b60026005541415620018ce5760405162461bcd60e51b815260040162000a5090620042ed565b6002600555620018de8162002d96565b6001600160a01b03821660009081526008602052604090205460ff16620019395760405162461bcd60e51b815260206004820152600e60248201526d4e6f74206c697175696461626c6560901b604482015260640162000a50565b6001600160a01b038281166000908152600260205260409081902054905163079cc67960e41b8152336004820152602481018490529116906379cc679090604401600060405180830381600087803b1580156200199557600080fd5b505af1158015620019aa573d6000803e3d6000fd5b505050506001600160a01b03821660009081526009602052604081208054839290620019d8908490620043e2565b9091555062000bb2905083838362003747565b6002600554141562001a115760405162461bcd60e51b815260040162000a5090620042ed565b60026005556001600160a01b038216600090815260086020526040902062001a419063d28ad6bd60e01b62002a7e565b62001a4e82308362002ae9565b604051630852cd8d60e31b8152600481018290529091506001600160a01b038316906342966c6890602401600060405180830381600087803b15801562001a9457600080fd5b505af115801562001aa9573d6000803e3d6000fd5b5050505062000bb283838362002c27565b600062001ac8828462004276565b6001600160a01b03861660009081526009602052604090205462001aee90869062004276565b1062001afc57508062001782565b50600062001782565b6001600160a01b038681166000908152600260205260409081902054905163d505accf60e01b8152336004820152306024820152604481018890526064810187905260ff8616608482015260a4810185905260c4810184905291169063d505accf9060e401600060405180830381600087803b15801562001b8557600080fd5b505af115801562001b9a573d6000803e3d6000fd5b5050505062001bab878787620018a8565b50505050505050565b60405162001bc56020820162003d15565b601f1982820381018352601f90910116604081905262001be9919060200162004441565b6040516020818303038152906040528051906020012081565b6006546001600160a01b0316331462001c575760405162461bcd60e51b81526020600482015260166024820152754e6f7420616e20617574686f72697a6564206e6f646560501b604482015260640162000a50565b600080808062001c6a858701876200445f565b6001600160a01b038d166000908152600760209081526040808320868452600601909152902054939750919550935091508b1462001ceb5760405162461bcd60e51b815260206004820152601d60248201527f526571756573744964206e6f7420696e2070656e64696e675175657565000000604482015260640162000a50565b308a8960405160200162001d0293929190620044a1565b60405160208183030381529060405280519060200120600760008b6001600160a01b03166001600160a01b0316815260200190815260200160002060070160008d8152602001908152602001600020600101541462001da45760405162461bcd60e51b815260206004820152601e60248201527f506172616d7320646f206e6f74206d6174636820726571756573742049440000604482015260640162000a50565b6001600160a01b03891660009081526007602081815260408084208785526006810183528185208590558f85529092019052812060010181905562001dea8883620043e2565b905046841462001e015762001e018385836200393e565b600760008b6001600160a01b03166001600160a01b0316815260200190815260200160002060070160008d815260200190815260200160002060060160009054906101000a900460ff161562001f47576001600160a01b03808b166000908152600760209081526040808320938716835260059093019052908120805484929062001e8e908490620043e2565b90915550506001600160a01b0383166000908152600960205260408120805483929062001ebd90849062004276565b9091555050801562001f41576001600160a01b03838116600090815260026020526040908190205490516340c10f1960e01b81528c83166004820152602481018490529116906340c10f1990604401600060405180830381600087803b15801562001f2757600080fd5b505af115801562001f3c573d6000803e3d6000fd5b505050505b62001fb5565b6001600160a01b03808b166000908152600760209081526040808320938716835260049093019052908120805484929062001f84908490620043e2565b9091555062001f9690508382620034e5565b9050801562001fb55762001fb56001600160a01b0384168b8362003585565b8762001ff757505050506001600160a01b03861660009081526007602081815260408084208c855290920190529020600601805461ff00191690555062001bab565b468414156200202a576200200c8389620034e5565b9750620020246001600160a01b0384168b8a62003585565b62002144565b60006200203a87890189620044cc565b9250505088816020018181525050600760008c6001600160a01b03166001600160a01b031681526020019081526020016000206002016000878152602001908152602001600020600086815260200190815260200160002081908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160020160146101000a81548160ff0219169083151502179055505050505b5050506001600160a01b03871660009081526007602081815260408084208d855290920190529020600601805461ff001916610100179055505050505050505050565b6004546001600160a01b03163314620021b45760405162461bcd60e51b815260040162000a509062004291565b6001600160a01b0381166200221b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000a50565b620022268162003493565b50565b6006546001600160a01b031633146200227e5760405162461bcd60e51b81526020600482015260166024820152754e6f7420616e20617574686f72697a6564206e6f646560501b604482015260640162000a50565b604080516001600160e01b03198b166020820152908101889052606081018790526080810186905260a00160408051601f1981840301815291815281516020928301206001600160a01b038b166000908152600784528281208e825260010190935291205414620023325760405162461bcd60e51b815260206004820152601e60248201527f506172616d7320646f206e6f74206d6174636820726571756573742049440000604482015260640162000a50565b6001600160a01b03881660009081526007602090815260408083208a845260020182528083208984529091529020548514620023b15760405162461bcd60e51b815260206004820152601f60248201527f5472616e73616374696f6e7320696e646578206f7574206f66206f7264657200604482015260640162000a50565b468614620023d35760405162461bcd60e51b815260040162000a5090620042c6565b6001600160a01b0380891660009081526007602090815260408083208e8452600180820184528285208590558c8552600a84528285208a8716808752908552838620548e8752600280850187528588208f8952875285882086516080810188529384528388018d8152928a168488018181528c15156060870190815283548089018555938c528a8c20965160039485029097018054978e166001600160a01b0319909816979097178755945196860196909655945193909101805492511515600160a01b026001600160a81b03199093169390991692909217179096558085529401909152812080549294508592909190620024d190849062004276565b90915550506001600160a01b03821660009081526008602052604090205460ff16156200250557620025058288856200393e565b6001600160a01b038216600090815260086020526040902054600160281b900460e01b6001600160e01b03191663a140c66d60e01b141562002554576200254e88838562001525565b6200259d565b6001600160a01b038216600090815260086020526040902054600160281b900460e01b6001600160e01b031916634b525f5560e11b14156200259d576200259d88838562001358565b604080516001600160a01b038681168252848116602083015291810185905287918991908b16907fa795b8ab9db4a674a68a002ba0df1a4f490b8d6e1593338db2fd9d7ff0eb4a2e9060600160405180910390a450505050505050505050565b600381815481106200260e57600080fd5b6000918252602090912001546001600160a01b0316905081565b600260055414156200264e5760405162461bcd60e51b815260040162000a5090620042ed565b60026005553360009081526007602090815260408083208484526006019091529020548214620026c15760405162461bcd60e51b815260206004820152601d60248201527f526571756573744964206e6f7420696e2070656e64696e675175657565000000604482015260640162000a50565b3360009081526007602081815260408084208685529092018152918190208151610100808201845282548252600183015494820185905260028301549382019390935260038201546001600160a01b0316606082015260048201546080820152600582015460a082015260069091015460ff808216151560c0840152929004909116151560e0820152906200278c5760405162461bcd60e51b815260206004820152601060248201526f4d757374206861766520706172616d7360801b604482015260640162000a50565b4281604001511115620027db5760405162461bcd60e51b815260206004820152601660248201527514995c5d595cdd081a5cc81b9bdd08195e1c1a5c995960521b604482015260640162000a50565b3360009081526007602090815260408083208584526006019091528120556060810151608082015160a0830151620028159291906200393e565b8060c0015115620029255760a081015133600090815260076020908152604080832060608601516001600160a01b031684526005019091528120805490919062002861908490620043e2565b909155505060a081015160608201516001600160a01b0316600090815260096020526040812080549091906200289990849062004276565b909155505060608101516001600160a01b03908116600090815260026020526040908190205460a084015191516340c10f1960e01b81523360048201526024810192909252909116906340c10f1990604401600060405180830381600087803b1580156200290657600080fd5b505af11580156200291b573d6000803e3d6000fd5b5050505062000bb2565b60a081015133600090815260076020908152604080832060608601516001600160a01b031684526004019091528120805490919062002966908490620043e2565b9250508190555060006200298382606001518360a00151620034e5565b6060830151909150620029a1906001600160a01b0316338362003585565b505050600160055550565b6001600160e01b0319811663080e28cb60e31b1480620029dc57506001600160e01b03198116632d12049b60e01b145b80620029f857506001600160e01b0319811663d28ad6bd60e01b145b8062002a1457506001600160e01b0319811663a3d1a13560e01b145b8062002a3057506001600160e01b03198116630457805d60e51b145b620022265760405162461bcd60e51b815260206004820152601e60248201527f4d757374207573652077686974656c69737465642066756e6374696f6e730000604482015260640162000a50565b81546001600160e01b031982811661010090920460e01b161462002ae55760405162461bcd60e51b815260206004820152601860248201527f46756e6374696f6e4964204e6f74205065726d69747465640000000000000000604482015260640162000a50565b5050565b6040516370a0823160e01b81526001600160a01b03838116600483015260009182918616906370a082319060240160206040518083038186803b15801562002b3057600080fd5b505afa15801562002b45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002b6b919062004584565b905062002b846001600160a01b03861633868662003963565b6040516370a0823160e01b81526001600160a01b0385811660048301528291908716906370a082319060240160206040518083038186803b15801562002bc957600080fd5b505afa15801562002bde573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062002c04919062004584565b62002c109190620043e2565b925062002c1e8584620035ea565b95945050505050565b60013462002c3d82662386f26fc100006200459e565b111562002c5e5760405162461bcd60e51b815260040162000a5090620045c0565b6001600160a01b038084166000908152600860209081526040808320888452600101909152902054168062002ca75760405162461bcd60e51b815260040162000a509062004324565b60065462002cbf90600160a01b900460ff16620031b4565b62002cca8362002d96565b505033600090815260076020908152604080832046845260029081018352818420878552835281842082516080810184526001600160a01b0397881680825281860197885286526008855283862098865260019889018552838620548816938101938452606081018681528254808b018455928752949095209451600390910290940180549487166001600160a01b031990951694909417845593519583019590955593519101805493511515600160a01b026001600160a81b03199094169190921617919091179055565b60008111620022265760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f604482015260640162000a50565b6001600160a01b038316600090815260096020526040902062002e0d908383620039a3565b505050565b60013462002e2882662386f26fc100006200459e565b111562002e495760405162461bcd60e51b815260040162000a5090620045c0565b6006546001600160a01b03168062002e755760405162461bcd60e51b815260040162000a509062004324565b60065462002e8d90600160a01b900460ff16620031b4565b336000818152600760209081526040808320549051929362002ece9390920160609290921b6bffffffffffffffffffffffff19168252601482015260340190565b60405160208183030381529060405280519060200120905060004261012c62002ef8919062004276565b336000908152600760205260408120805492935060019290919062002f1f90849062004276565b909155505033600090815260076020818152604080842086855290920190529020600101541562002f8a5760405162461bcd60e51b8152602060048201526014602482015273135d5cdd081d5cd94818481d5b9a5c5d5948125160621b604482015260640162000a50565b3360009081526007602090815260408083208b845260060182529182902084905581516101008101835284815291518282019162002fcf918f918f91879101620044a1565b60408051601f19818403018152918152815160209283012083528282018590526001600160a01b03808e168483015260608085018e905260808086018e90528c151560a080880191909152600060c097880181905233815260078088528682208c835201875285812089518155968901516001880155888601516002880155928801516003870180549186166001600160a01b03199092169190911790559087015160048601558601516005850155938501516006938401805460e09097015115156101000261ff00199215159290921661ffff199097169690961717909455905490519216914780156108fc0292909190818181858888f19350505050158015620030df573d6000803e3d6000fd5b508b7fd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c653384348f8f8760018d604051620031219897969594939291906200461d565b60405180910390a2505050505050505050505050565b6001600160e01b0319811663a140c66d60e01b148062002a3057506001600160e01b03198116634b525f5560e11b14620022265760405162461bcd60e51b815260206004820152601e60248201527f4d757374207573652077686974656c69737465642066756e6374696f6e730000604482015260640162000a50565b8015620022265760405162461bcd60e51b815260206004820152601b60248201527f4b694272696467653a20556e646572206d61696e74656e616e63650000000000604482015260640162000a50565b6002346200321a82662386f26fc100006200459e565b11156200323b5760405162461bcd60e51b815260040162000a5090620045c0565b6006546001600160a01b031680620032675760405162461bcd60e51b815260040162000a509062004324565b6006546200327f90600160a01b900460ff16620031b4565b6001600160a01b038916600090815260076020908152604080832054815160608e901b6bffffffffffffffffffffffff19168185015260348082019290925282518082039092018252605401909152805191012090620032e24261012c62004276565b6001600160a01b038c16600090815260076020526040812080549293506001929091906200331290849062004276565b90915550506001600160a01b038b16600090815260076020908152604080832085845260010190915290205415620033845760405162461bcd60e51b8152602060048201526014602482015273135d5cdd081d5cd94818481d5b9a5c5d5948125160621b604482015260640162000a50565b604080516001600160e01b03198b166020820152908101899052606081018890526080810187905260a00160405160208183030381529060405280519060200120600760008d6001600160a01b03166001600160a01b03168152602001908152602001600020600101600084815260200190815260200160002081905550600660009054906101000a90046001600160a01b03166001600160a01b03166108fc479081150290604051600060405180830381858888f1935050505015801562003451573d6000803e3d6000fd5b508b7fd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c658c84348e8e8760018d604051620031219897969594939291906200461d565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200352257600080fd5b505afa15801562003537573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200355d919062004687565b90506200356c816012620046a7565b6200357990600a620047ca565b620017829084620047db565b6040516001600160a01b03831660248201526044810182905262002e0d90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915262003a47565b600080836001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156200362757600080fd5b505afa1580156200363c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062003662919062004687565b905062003671816012620046a7565b6200367e90600a620047ca565b6200178290846200459e565b6040805180820182526001600160a01b038481168083529084166020928301819052600080546001600160a01b03199081168417825560018054909116831790558451938401929092529282019290925260600160405160208183030381529060405280519060200120604051620037029062003d15565b8190604051809103906000f590508015801562003723573d6000803e3d6000fd5b50600080546001600160a01b03199081169091556001805490911690559392505050565b33600090815260076020908152604080832086845260060190915290205415620037b45760405162461bcd60e51b815260206004820152601b60248201527f6e756d626572206f662072657175657374732065786365656465640000000000604482015260640162000a50565b3360009081526007602090815260408083206001600160a01b038616845260050190915281208054839290620037ec90849062004276565b90915550600090506060468514156200386557604080514660208201819052918101919091526001600160a01b0385166060820152608081018490527f3031303763376236666434353439386462363465356636613831326133393164925060a001604051602081830303815290604052905062003924565b604080516080810182526001600160a01b0386811680835260208084018890526000828152600882528581208b825260019081018352868220549094168587015260608501849052918252600981528482208a83526002810182528583205493018152908490205493517f62666434643934343137643034393662613733353735643464623431396161369650620039069446948b9490939092016200434d565b60405160208183030381529060405290506200392484868562002de8565b6200120882306373a07c1160e11b87898860018862002e12565b6001600160a01b038316600090815260096020526040902062002e0d90838362003b20565b6040516001600160a01b03808516602483015283166044820152606481018290526200399d9085906323b872dd60e01b90608401620035b2565b50505050565b60008281526002840160205260409020548111620039e957600082815260028401602052604081208054839290620039dd908490620043e2565b9091555062002e0d9050565b6000828152600284016020908152604080832054600187019092529091205462003a1590839062004276565b62003a219190620043e2565b600083815260018501602090815260408083209390935560028601905290812055505050565b600062003a9e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031662003bb89092919063ffffffff16565b80519091501562002e0d578080602001905181019062003abf9190620047fe565b62002e0d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840162000a50565b6000828152600184016020526040902054811162003b5a57600082815260018401602052604081208054839290620039dd908490620043e2565b6000828152600184016020908152604080832054600287019092529091205462003b8690839062004276565b62003b929190620043e2565b600083815260028501602090815260408083209390935560018601905290812055505050565b606062000a19848460008585843b62003c145760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640162000a50565b600080866001600160a01b0316858760405162003c32919062004441565b60006040518083038185875af1925050503d806000811462003c71576040519150601f19603f3d011682016040523d82523d6000602084013e62003c76565b606091505b509150915062003c8882828662003c93565b979650505050505050565b6060831562003ca457508162000a1c565b82511562003cb55782518084602001fd5b8160405162461bcd60e51b815260040162000a5091906200481e565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915290565b61176c806200483483390190565b6001600160a01b03811681146200222657600080fd5b803562003d468162003d23565b919050565b6000806040838503121562003d5f57600080fd5b82359150602083013562003d738162003d23565b809150509250929050565b60008060006060848603121562003d9457600080fd5b833562003da18162003d23565b95602085013595506040909401359392505050565b80151581146200222657600080fd5b803562003d468162003db6565b80356001600160e01b03198116811462003d4657600080fd5b600080600080600060a0868803121562003e0457600080fd5b853562003e118162003d23565b9450602086013562003e238162003db6565b935062003e336040870162003dd2565b925060608601359150608086013562003e4c8162003d23565b809150509295509295909350565b60006020828403121562003e6d57600080fd5b813562000a1c8162003d23565b60008060006060848603121562003e9057600080fd5b83359250602084013562003ea48162003d23565b929592945050506040919091013590565b6000806000806080858703121562003ecc57600080fd5b843562003ed98162003d23565b935062003ee96020860162003dd2565b925060408501359150606085013562003f028162003d23565b939692955090935050565b6000806040838503121562003f2157600080fd5b823562003f2e8162003d23565b946020939093013593505050565b60006020828403121562003f4f57600080fd5b813562000a1c8162003db6565b6000806040838503121562003f7057600080fd5b823562003f7d8162003d23565b9150602083013562003d738162003d23565b60008060006060848603121562003fa557600080fd5b833562003fb28162003d23565b9250602084013562003ea48162003d23565b6000806000806080858703121562003fdb57600080fd5b843562003fe88162003d23565b966020860135965060408601359560600135945092505050565b81516001600160a01b039081168252602080840151908301526040808401519091169082015260608083015115159082015260808101620012b2565b60ff811681146200222657600080fd5b600080600080600080600060e0888a0312156200406a57600080fd5b8735965060208801356200407e8162003d23565b9550604088013594506060880135935060808801356200409e816200403e565b9699959850939692959460a0840135945060c09093013592915050565b600080600080600080600060c0888a031215620040d757600080fd5b87359650620040e96020890162003dd2565b95506040880135620040fb8162003d23565b9450606088013593506080880135925060a088013567ffffffffffffffff808211156200412757600080fd5b818a0191508a601f8301126200413c57600080fd5b8135818111156200414c57600080fd5b8b60208285010111156200415f57600080fd5b60208301945080935050505092959891949750929550565b6000806000806000806000806000806101408b8d0312156200419857600080fd5b8a359950620041aa60208c0162003dd2565b985060408b0135620041bc8162003d23565b975060608b0135965060808b0135955060a08b0135945060c08b0135620041e38162003d23565b935060e08b013592506101008b0135620041fd8162003d23565b91506101208b0135620042108162003db6565b809150509295989b9194979a5092959850565b6000602082840312156200423657600080fd5b5035919050565b600080604083850312156200425157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b600082198211156200428c576200428c62004260565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c15dc9bdb99c818da185a5b9259609a1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b85815260208101859052610100810162004398604083018680516001600160a01b03908116835260208083015190840152604080830151909116908301526060908101511515910152565b60c082019390935260e001529392505050565b6020808252601e908201527f43616c6c6572206973206e6f7420746865206e6f6465206f7220757365720000604082015260600190565b600082821015620043f757620043f762004260565b500390565b634e487b7160e01b600052603260045260246000fd5b60005b838110156200442f57818101518382015260200162004415565b838111156200399d5750506000910152565b600082516200445581846020870162004412565b9190910192915050565b600080600080608085870312156200447657600080fd5b84359350602085013592506040850135620044918162003d23565b9396929550929360600135925050565b6001600160a01b039390931683526001600160e01b0319919091166020830152604082015260600190565b600080600083850360c0811215620044e357600080fd5b84359350602085013592506080603f19820112156200450157600080fd5b506040516080810181811067ffffffffffffffff821117156200453457634e487b7160e01b600052604160045260246000fd5b8060405250620045476040860162003d39565b815260608501356020820152620045616080860162003d39565b60408201526200457460a0860162003dc5565b6060820152809150509250925092565b6000602082840312156200459757600080fd5b5051919050565b6000816000190483118215151615620045bb57620045bb62004260565b500290565b602080825260159082015274496e73756666696369656e7420426173652046656560581b604082015260600190565b600081518084526200460981602086016020860162004412565b601f01601f19169290920160200192915050565b6001600160a01b0389811682526020820189905260408201889052861660608201526001600160e01b03198516608082015260a0810184905260c0810183905261010060e082018190526000906200467883820185620045ef565b9b9a5050505050505050505050565b6000602082840312156200469a57600080fd5b815162000a1c816200403e565b600060ff821660ff841680821015620046c457620046c462004260565b90039392505050565b600181815b808511156200470e578160001904821115620046f257620046f262004260565b808516156200470057918102915b93841c9390800290620046d2565b509250929050565b6000826200472757506001620012b2565b816200473657506000620012b2565b81600181146200474f57600281146200475a576200477a565b6001915050620012b2565b60ff8411156200476e576200476e62004260565b50506001821b620012b2565b5060208310610133831016604e8410600b84101617156200479f575081810a620012b2565b620047ab8383620046cd565b8060001904821115620047c257620047c262004260565b029392505050565b600062000a1c60ff84168362004716565b600082620047f957634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156200481157600080fd5b815162000a1c8162003db6565b60208152600062000a1c6020830184620045ef56fe6101806040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b506040518060400160405280601581526020017f4b69427269646765205631204c697175696469747900000000000000000000008152506040518060400160405280600a8152602001694b69422d56312d4c495160b01b81525081604051806040016040528060018152602001603160f81b81525083838160039080519060200190620000c6929190620001ef565b508051620000dc906004906020840190620001ef565b5050825160209384012082519284019290922060c083815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818a0181905281830198909852606081019590955260808086019390935230858301528051808603909201825292840180845281519190970120905261010093909352630890357360e41b9093525080513394506389035730935060c480840193829003018186803b1580156200019a57600080fd5b505afa158015620001af573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001d59190620002b2565b6001600160a01b0390811661016052166101405262000327565b828054620001fd90620002ea565b90600052602060002090601f0160209004810192826200022157600085556200026c565b82601f106200023c57805160ff19168380011785556200026c565b828001600101855582156200026c579182015b828111156200026c5782518255916020019190600101906200024f565b506200027a9291506200027e565b5090565b5b808211156200027a57600081556001016200027f565b80516001600160a01b0381168114620002ad57600080fd5b919050565b60008060408385031215620002c657600080fd5b620002d18362000295565b9150620002e16020840162000295565b90509250929050565b600181811c90821680620002ff57607f821691505b602082108114156200032157634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051610160516113d86200039460003960006102eb0152600081816102ac01526104b1015260006106f101526000610b4a01526000610b9901526000610b7401526000610af801526000610b2101526113d86000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063a9059cbb11610071578063a9059cbb14610248578063d505accf1461025b578063dd62ed3e1461026e578063e78cea92146102a7578063fc0c546a146102e657600080fd5b806370a08231146101de57806379cc6790146102075780637ecebe001461021a57806395d89b411461022d578063a457c2d71461023557600080fd5b8063313ce567116100f4578063313ce5671461018c5780633644e5151461019b57806339509351146101a357806340c10f19146101b657806342966c68146101cb57600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd14610179575b600080fd5b61012e61030d565b60405161013b919061115a565b60405180910390f35b6101576101523660046111cb565b61039f565b604051901515815260200161013b565b6002545b60405190815260200161013b565b6101576101873660046111f5565b6103b5565b6040516012815260200161013b565b61016b610464565b6101576101b13660046111cb565b610473565b6101c96101c43660046111cb565b6104af565b005b6101c96101d9366004611231565b610535565b61016b6101ec36600461124a565b6001600160a01b031660009081526020819052604090205490565b6101c96102153660046111cb565b610542565b61016b61022836600461124a565b6105c8565b61012e6105e8565b6101576102433660046111cb565b6105f7565b6101576102563660046111cb565b610690565b6101c961026936600461126c565b61069d565b61016b61027c3660046112df565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102ce7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161013b565b6102ce7f000000000000000000000000000000000000000000000000000000000000000081565b60606003805461031c90611312565b80601f016020809104026020016040519081016040528092919081815260200182805461034890611312565b80156103955780601f1061036a57610100808354040283529160200191610395565b820191906000526020600020905b81548152906001019060200180831161037857829003601f168201915b5050505050905090565b60006103ac338484610801565b50600192915050565b60006103c2848484610925565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561044c5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6104598533858403610801565b506001949350505050565b600061046e610af4565b905090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103ac9185906104aa90869061135d565b610801565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633146105275760405162461bcd60e51b815260206004820152601860248201527f63616c6c6572206973206e6f74207468652062726964676500000000000000006044820152606401610443565b6105318282610be7565b5050565b61053f3382610cc6565b50565b600061054e833361027c565b9050818110156105ac5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610443565b6105b98333848403610801565b6105c38383610cc6565b505050565b6001600160a01b0381166000908152600560205260408120545b92915050565b60606004805461031c90611312565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156106795760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610443565b6106863385858403610801565b5060019392505050565b60006103ac338484610925565b834211156106ed5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610443565b60007f000000000000000000000000000000000000000000000000000000000000000088888861071c8c610e14565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061077782610e3c565b9050600061078782878787610e8a565b9050896001600160a01b0316816001600160a01b0316146107ea5760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610443565b6107f58a8a8a610801565b50505050505050505050565b6001600160a01b0383166108635760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610443565b6001600160a01b0382166108c45760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610443565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166109895760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610443565b6001600160a01b0382166109eb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610443565b6001600160a01b03831660009081526020819052604090205481811015610a635760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610443565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610a9a90849061135d565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ae691815260200190565b60405180910390a350505050565b60007f0000000000000000000000000000000000000000000000000000000000000000461415610b4357507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6001600160a01b038216610c3d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610443565b8060026000828254610c4f919061135d565b90915550506001600160a01b03821660009081526020819052604081208054839290610c7c90849061135d565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610d265760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610443565b6001600160a01b03821660009081526020819052604090205481811015610d9a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610443565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610dc9908490611375565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b03811660009081526005602052604090208054600181018255905b50919050565b60006105e2610e49610af4565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000610e9b87878787610eb2565b91509150610ea881610f9f565b5095945050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610ee95750600090506003610f96565b8460ff16601b14158015610f0157508460ff16601c14155b15610f125750600090506004610f96565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610f66573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610f8f57600060019250925050610f96565b9150600090505b94509492505050565b6000816004811115610fb357610fb361138c565b1415610fbc5750565b6001816004811115610fd057610fd061138c565b141561101e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610443565b60028160048111156110325761103261138c565b14156110805760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610443565b60038160048111156110945761109461138c565b14156110ed5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610443565b60048160048111156111015761110161138c565b141561053f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610443565b600060208083528351808285015260005b818110156111875785810183015185820160400152820161116b565b81811115611199576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b03811681146111c657600080fd5b919050565b600080604083850312156111de57600080fd5b6111e7836111af565b946020939093013593505050565b60008060006060848603121561120a57600080fd5b611213846111af565b9250611221602085016111af565b9150604084013590509250925092565b60006020828403121561124357600080fd5b5035919050565b60006020828403121561125c57600080fd5b611265826111af565b9392505050565b600080600080600080600060e0888a03121561128757600080fd5b611290886111af565b965061129e602089016111af565b95506040880135945060608801359350608088013560ff811681146112c257600080fd5b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156112f257600080fd5b6112fb836111af565b9150611309602084016111af565b90509250929050565b600181811c9082168061132657607f821691505b60208210811415610e3657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561137057611370611347565b500190565b60008282101561138757611387611347565b500390565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220a7877b5c7c43e2573a651595fe52b90a42e7de6c3655fd02d273263e0d57cdf664736f6c63430008090033a26469706673582212207d08a9060772aafffb3b9ba677e3feba6830c4fe7e251385173185219e86973f64736f6c63430008090033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.