{ "address": "0xBe429dEdC1E15c546458caDbCE67A6fb24569ad1", "abi": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "addr", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "chainId", "type": "uint256" } ], "name": "TokenAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "addr", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "chainId", "type": "uint256" } ], "name": "TokenRemoved", "type": "event" }, { "inputs": [], "name": "MAX_SIZE", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sourceAddr", "type": "address" }, { "internalType": "uint256", "name": "targetChainId", "type": "uint256" } ], "name": "getLocal", "outputs": [ { "components": [ { "internalType": "address", "name": "addr", "type": "address" }, { "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "enum RToken.IssueType", "name": "issueType", "type": "uint8" }, { "internalType": "bool", "name": "exist", "type": "bool" } ], "internalType": "struct RToken.Token", "name": "token", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "targetChainId", "type": "uint256" } ], "name": "isZero", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address[]", "name": "tokens", "type": "address[]" }, { "internalType": "enum RToken.IssueType[]", "name": "issueTypes", "type": "uint8[]" }, { "internalType": "uint256", "name": "targetChainId", "type": "uint256" } ], "name": "issue", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "targetAddr", "type": "address" } ], "name": "revoke", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "transactionHash": "0xf6183a07c4fe828ad3f29ce7ff9be4957a3eb6be27d2021e6e93f5e9dcae08ac", "receipt": { "to": null, "from": "0xbB5AD4F9b79Cf1D6585D1021C08ADf40E965f0BA", "contractAddress": "0xBe429dEdC1E15c546458caDbCE67A6fb24569ad1", "transactionIndex": 0, "gasUsed": "953946", "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000080000800000000000000000000000000000000000000000000000000000000000000000000000000000020100000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", "blockHash": "0xec82b03ca2c1f66fea343d3618ee873df09a8f2a17d846b8ad179aed155568d3", "transactionHash": "0xf6183a07c4fe828ad3f29ce7ff9be4957a3eb6be27d2021e6e93f5e9dcae08ac", "logs": [ { "transactionIndex": 0, "blockNumber": 1652738, "transactionHash": "0xf6183a07c4fe828ad3f29ce7ff9be4957a3eb6be27d2021e6e93f5e9dcae08ac", "address": "0xBe429dEdC1E15c546458caDbCE67A6fb24569ad1", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000bb5ad4f9b79cf1d6585d1021c08adf40e965f0ba" ], "data": "0x", "logIndex": 0, "blockHash": "0xec82b03ca2c1f66fea343d3618ee873df09a8f2a17d846b8ad179aed155568d3" } ], "blockNumber": 1652738, "cumulativeGasUsed": "953946", "status": 1, "byzantium": true }, "args": [], "solcInputHash": "8dda494b066e0ce03323feed232af508", "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"TokenAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"TokenRemoved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MAX_SIZE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sourceAddr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"targetChainId\",\"type\":\"uint256\"}],\"name\":\"getLocal\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"enum RToken.IssueType\",\"name\":\"issueType\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"exist\",\"type\":\"bool\"}],\"internalType\":\"struct RToken.Token\",\"name\":\"token\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetChainId\",\"type\":\"uint256\"}],\"name\":\"isZero\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"enum RToken.IssueType[]\",\"name\":\"issueTypes\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256\",\"name\":\"targetChainId\",\"type\":\"uint256\"}],\"name\":\"issue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"targetAddr\",\"type\":\"address\"}],\"name\":\"revoke\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getLocal(address,uint256)\":{\"details\":\"This should be responsible to get token mapping for current chain\",\"params\":{\"sourceAddr\":\"address of source token\",\"targetChainId\":\"of token on target\"}},\"issue(address[],uint8[],uint256)\":{\"details\":\"This should be responsible to connect tokens between chains\",\"params\":{\"issueTypes\":\"for tokens\",\"targetChainId\":\"of remote token\",\"tokens\":\"addresses on link connection\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"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.\"},\"revoke(address)\":{\"details\":\"This should be responsible to remove tokens connection between chains\",\"params\":{\"targetAddr\":\"address of target token\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/managers/BridgeTokenManager.sol\":\"BridgeTokenManager\"},\"evmVersion\":\"berlin\",\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _setOwner(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _setOwner(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _setOwner(newOwner);\\n }\\n\\n function _setOwner(address newOwner) private {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n}\\n\",\"keccak256\":\"0x027b891937d20ccf213fdb9c31531574256de774bda99d3a70ecef6e1913ed2a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02348b2e4b9f3200c7e3907c5c2661643a6d8520e9f79939fbb9b4005a54894d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0x5718c5df9bd67ac68a796961df938821bb5dc0cd4c6118d77e9145afb187409b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xa28007762d9da9db878dd421960c8cb9a10471f47ab5c1b3309bfe48e9e79ff4\",\"license\":\"MIT\"},\"contracts/interfaces/IBridgeToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IBridgeToken {\\n function burn(address from, uint256 amount) external;\\n\\n function mint(address to, uint256 amount) external;\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x5da30954f099315154d694061fef990ffd9e5df7c9b356765c2ce99b798b4783\",\"license\":\"MIT\"},\"contracts/interfaces/IBridgeTokenManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"../library/RToken.sol\\\";\\n\\ninterface IBridgeTokenManager {\\n event TokenAdded(address indexed addr, uint256 chainId);\\n event TokenRemoved(address indexed addr, uint256 chainId);\\n\\n function issue(\\n address[] calldata tokens,\\n RToken.IssueType[] calldata issueTypes,\\n uint256 targetChainId\\n ) external;\\n\\n function revoke(address targetAddr) external;\\n\\n function getLocal(address sourceAddr, uint256 targetChainId)\\n external\\n view\\n returns (RToken.Token memory token);\\n\\n function isZero(uint256 targetChainId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x36bfbca4f6ba1f8e8fc0f2effa6a1d43d22a83bda9c189d109ae72f67f9b4fd6\",\"license\":\"MIT\"},\"contracts/library/RToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/utils/Context.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport \\\"../interfaces/IBridgeToken.sol\\\";\\n\\nlibrary RToken {\\n using SafeERC20 for IERC20;\\n\\n enum IssueType {\\n DEFAULT,\\n MINTABLE\\n }\\n\\n struct Token {\\n address addr;\\n uint256 chainId;\\n IssueType issueType;\\n bool exist;\\n }\\n\\n function unsafeTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n require(from.balance >= amount, \\\"RT: INSUFFICIENT_BALANCE\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\\n (bool success, ) = to.call{value: amount}(\\\"\\\");\\n require(success, \\\"RT: SEND_REVERT\\\");\\n }\\n\\n function enter(\\n Token memory token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal returns (Token memory) {\\n require(token.exist, \\\"RT: NOT_LISTED\\\");\\n if (token.issueType == IssueType.MINTABLE) {\\n IBridgeToken(token.addr).burn(from, amount);\\n } else if (token.issueType == IssueType.DEFAULT) {\\n IERC20(token.addr).safeTransferFrom(from, to, amount);\\n } else {\\n assert(false);\\n }\\n return token;\\n }\\n\\n function exit(\\n Token memory token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal returns (Token memory) {\\n require(token.exist, \\\"RT: NOT_LISTED\\\");\\n if (token.addr == address(0)) {\\n unsafeTransfer(from, to, amount);\\n } else if (token.issueType == IssueType.MINTABLE) {\\n IBridgeToken(token.addr).mint(to, amount);\\n } else if (token.issueType == IssueType.DEFAULT) {\\n IERC20(token.addr).safeTransfer(to, amount);\\n } else {\\n assert(false);\\n }\\n return token;\\n }\\n}\\n\",\"keccak256\":\"0x90ddd994ec4c16499929a0fb2f68543cdba5aabe8ad11235dd944697939f1d72\",\"license\":\"MIT\"},\"contracts/managers/BridgeTokenManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nimport \\\"../interfaces/IBridgeTokenManager.sol\\\";\\nimport \\\"../library/RToken.sol\\\";\\n\\ncontract BridgeTokenManager is ERC165, Ownable, IBridgeTokenManager {\\n uint8 public constant MAX_SIZE = 2;\\n bytes32 private immutable _salt;\\n uint256 private immutable _chainId;\\n\\n mapping(bytes32 => bytes32) private _keychain;\\n mapping(bytes32 => RToken.Token) private _tokens;\\n\\n constructor() {\\n _salt = keccak256(\\n abi.encodePacked(\\n blockhash(block.number - 1),\\n block.timestamp,\\n block.difficulty,\\n block.coinbase\\n )\\n );\\n uint256 chainId_;\\n assembly {\\n chainId_ := chainid()\\n }\\n _chainId = chainId_;\\n }\\n\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IBridgeTokenManager).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev This should be responsible to get token mapping for current chain\\n * @param sourceAddr address of source token\\n * @param targetChainId of token on target\\n */\\n function getLocal(address sourceAddr, uint256 targetChainId)\\n public\\n view\\n override\\n returns (RToken.Token memory token)\\n {\\n bytes32 tokenKey = _keychain[createKey(sourceAddr, targetChainId)];\\n if (tokenKey == 0) {\\n return token;\\n }\\n bytes32 sourceKey;\\n if (_chainId != targetChainId) {\\n sourceKey = tokenKey;\\n } else {\\n sourceKey = _keychain[tokenKey];\\n }\\n token = _tokens[sourceKey];\\n }\\n\\n function isZero(uint256 targetChainId) public view override returns (bool) {\\n RToken.Token memory token = getLocal(address(0), targetChainId);\\n if (!token.exist) {\\n return false;\\n }\\n if (token.addr == address(0)) {\\n return true;\\n }\\n return false;\\n }\\n\\n /**\\n * @dev This should be responsible to remove tokens connection between chains\\n * @param targetAddr address of target token\\n */\\n function revoke(address targetAddr) external override onlyOwner {\\n bytes32 sourceKey = _keychain[createKey(targetAddr, _chainId)];\\n require(sourceKey != 0, \\\"BTM: NOT_EXIST\\\");\\n\\n bytes32 targetKey = _keychain[sourceKey];\\n require(targetKey != 0, \\\"BTM: NOT_EXIST\\\");\\n\\n delete _keychain[sourceKey];\\n delete _keychain[targetKey];\\n\\n RToken.Token memory sourceToken = _tokens[sourceKey];\\n RToken.Token memory targetToken = _tokens[targetKey];\\n\\n delete _tokens[sourceKey];\\n delete _tokens[targetKey];\\n\\n emit TokenRemoved(sourceToken.addr, sourceToken.chainId);\\n emit TokenRemoved(targetToken.addr, targetToken.chainId);\\n }\\n\\n /**\\n * @dev This should be responsible to connect tokens between chains\\n * @param tokens addresses on link connection\\n * @param issueTypes for tokens\\n * @param targetChainId of remote token\\n */\\n function issue(\\n address[] calldata tokens,\\n RToken.IssueType[] calldata issueTypes,\\n uint256 targetChainId\\n ) external override onlyOwner {\\n require(tokens.length == issueTypes.length, \\\"BTM: WRONG_LENGTH\\\");\\n require(tokens.length == MAX_SIZE, \\\"BTM: MAX_SIZE\\\");\\n\\n require(targetChainId != _chainId, \\\"BTM: SAME_CHAIN\\\");\\n\\n bytes32 sourceKey = createKey(tokens[1], _chainId);\\n require(_keychain[sourceKey] == 0, \\\"BTM: SOURCE_EXIST\\\");\\n\\n bytes32 targetKey = createKey(tokens[0], targetChainId);\\n require(_keychain[targetKey] == 0, \\\"BTM: TARGET_EXIST\\\");\\n\\n // linking\\n _keychain[sourceKey] = targetKey;\\n _keychain[targetKey] = sourceKey;\\n\\n RToken.Token memory sourceToken = RToken.Token(\\n tokens[0],\\n _chainId,\\n issueTypes[0],\\n true\\n );\\n RToken.Token memory targetToken = RToken.Token(\\n tokens[1],\\n targetChainId,\\n issueTypes[1],\\n true\\n );\\n\\n _tokens[sourceKey] = sourceToken;\\n _tokens[targetKey] = targetToken;\\n\\n emit TokenAdded(sourceToken.addr, sourceToken.chainId);\\n emit TokenAdded(targetToken.addr, targetToken.chainId);\\n }\\n\\n function createKey(address sourceAddr, uint256 targetChainId)\\n private\\n view\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(_salt, sourceAddr, targetChainId));\\n }\\n}\\n\",\"keccak256\":\"0x718a2777c9fdbddf7201b1d782867d2000d286036a6d9b350851888df5299cf8\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b5061001a33610078565b6100256001436100c8565b604080519140602083015242908201524460608083019190915241901b6001600160601b031916608082015260940160408051601f1981840301815291905280516020909101206080524660a0526100eb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000828210156100e657634e487b7160e01b81526011600452602481fd5b500390565b60805160a051610fd361012c6000396000818161025a015281816102f70152818161046a015281816107d50152610b5d01526000610cdf0152610fd36000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80637a38f9eb116100665780637a38f9eb146100f05780638d67799e146101035780638da5cb5b1461011d578063e0f5ee3214610138578063f2fde38b1461015857600080fd5b806301ffc9a7146100985780632db62249146100c0578063715018a6146100d557806374a8f103146100dd575b600080fd5b6100ab6100a6366004610eb1565b61016b565b60405190151581526020015b60405180910390f35b6100d36100ce366004610e40565b6101a2565b005b6100d3610769565b6100d36100eb366004610df6565b61079f565b6100ab6100fe366004610ef8565b610ac6565b61010b600281565b60405160ff90911681526020016100b7565b6000546040516001600160a01b0390911681526020016100b7565b61014b610146366004610e17565b610b09565b6040516100b79190610f45565b6100d3610166366004610df6565b610c3e565b60006001600160e01b0319821663c3d3c49360e01b148061019c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b031633146101d55760405162461bcd60e51b81526004016101cc90610f10565b60405180910390fd5b8382146102185760405162461bcd60e51b8152602060048201526011602482015270084a89a7440aea49e9c8ebe988a9c8ea89607b1b60448201526064016101cc565b600284146102585760405162461bcd60e51b815260206004820152600d60248201526c42544d3a204d41585f53495a4560981b60448201526064016101cc565b7f00000000000000000000000000000000000000000000000000000000000000008114156102ba5760405162461bcd60e51b815260206004820152600f60248201526e212a269d1029a0a6a2afa1a420a4a760891b60448201526064016101cc565b600061031b868660018181106102e057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906102f59190610df6565b7f0000000000000000000000000000000000000000000000000000000000000000610cd9565b6000818152600160205260409020549091501561036e5760405162461bcd60e51b81526020600482015260116024820152701095134e8814d3d55490d157d1561254d5607a1b60448201526064016101cc565b60006103af8787600081811061039457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103a99190610df6565b84610cd9565b600081815260016020526040902054909150156104025760405162461bcd60e51b81526020600482015260116024820152701095134e8815105491d15517d1561254d5607a1b60448201526064016101cc565b600082815260016020526040808220839055828252808220849055805160808101909152808989848161044557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061045a9190610df6565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000008152602001878760008181106104af57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104c49190610ed9565b60018111156104e357634e487b7160e01b600052602160045260246000fd5b8152602001600115158152509050600060405180608001604052808a8a600181811061051f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105349190610df6565b6001600160a01b031681526020018681526020018888600181811061056957634e487b7160e01b600052603260045260246000fd5b905060200201602081019061057e9190610ed9565b600181111561059d57634e487b7160e01b600052602160045260246000fd5b81526001602091820181905260008781526002808452604091829020875181546001600160a01b0319166001600160a01b03909116178155938701518484015590860151908301805494955086949192909160ff191690838181111561061357634e487b7160e01b600052602160045260246000fd5b0217905550606091909101516002918201805461ff0019166101009215159290920291909117905560008481526020828152604091829020845181546001600160a01b0319166001600160a01b03909116178155908401516001828101919091559184015192810180548594929360ff199091169083818111156106a757634e487b7160e01b600052602160045260246000fd5b021790555060609190910151600290910180549115156101000261ff001990921691909117905581516020808401516040519081526001600160a01b03909216917ff4c563a3ea86ff1f4275e8c207df0375a51963f2b831b7bf4da8be938d92876c910160405180910390a280600001516001600160a01b03167ff4c563a3ea86ff1f4275e8c207df0375a51963f2b831b7bf4da8be938d92876c826020015160405161075691815260200190565b60405180910390a2505050505050505050565b6000546001600160a01b031633146107935760405162461bcd60e51b81526004016101cc90610f10565b61079d6000610d40565b565b6000546001600160a01b031633146107c95760405162461bcd60e51b81526004016101cc90610f10565b6000600160006107f9847f0000000000000000000000000000000000000000000000000000000000000000610cd9565b815260208101919091526040016000205490508061084a5760405162461bcd60e51b815260206004820152600e60248201526d1095134e881393d517d1561254d560921b60448201526064016101cc565b600081815260016020526040902054806108975760405162461bcd60e51b815260206004820152600e60248201526d1095134e881393d517d1561254d560921b60448201526064016101cc565b60008281526001602081815260408084208490558484528084208490558584526002808352818520825160808101845281546001600160a01b03168152818601549481019490945290810154929390929184019160ff169081111561090c57634e487b7160e01b600052602160045260246000fd5b600181111561092b57634e487b7160e01b600052602160045260246000fd5b815260029182015460ff6101009091048116151560209283015260008681528383526040808220815160808101835281546001600160a01b031681526001828101549682019690965295810154969750919591939085019291909116908111156109a557634e487b7160e01b600052602160045260246000fd5b60018111156109c457634e487b7160e01b600052602160045260246000fd5b8152600291820154610100900460ff1615156020918201526000878152828252604080822080546001600160a01b031990811682556001808301859055918601805461ffff199081169091558a85528385208054909216825591810193909355919093018054909116905584518582015192519283529293506001600160a01b03909216917fbe9bb4bdca0a094babd75e3a98b1d2e2390633430d0a2f6e2b9970e2ee03fb2e910160405180910390a280600001516001600160a01b03167fbe9bb4bdca0a094babd75e3a98b1d2e2390633430d0a2f6e2b9970e2ee03fb2e8260200151604051610ab791815260200190565b60405180910390a25050505050565b600080610ad4600084610b09565b90508060600151610ae85750600092915050565b80516001600160a01b0316610b005750600192915050565b50600092915050565b604080516080810182526000808252602082018190529181018290526060810182905290600181610b3a8686610cd9565b8152602081019190915260400160002054905080610b58575061019c565b6000837f000000000000000000000000000000000000000000000000000000000000000014610b88575080610b99565b506000818152600160205260409020545b600081815260026020818152604092839020835160808101855281546001600160a01b031681526001808301549382019390935292810154929390929084019160ff90911690811115610bfc57634e487b7160e01b600052602160045260246000fd5b6001811115610c1b57634e487b7160e01b600052602160045260246000fd5b815260029190910154610100900460ff1615156020909101529250505092915050565b6000546001600160a01b03163314610c685760405162461bcd60e51b81526004016101cc90610f10565b6001600160a01b038116610ccd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101cc565b610cd681610d40565b50565b604080517f000000000000000000000000000000000000000000000000000000000000000060208083019190915260609490941b6bffffffffffffffffffffffff191681830152605480820193909352815180820390930183526074019052805191012090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610da757600080fd5b919050565b60008083601f840112610dbd578182fd5b50813567ffffffffffffffff811115610dd4578182fd5b6020830191508360208260051b8501011115610def57600080fd5b9250929050565b600060208284031215610e07578081fd5b610e1082610d90565b9392505050565b60008060408385031215610e29578081fd5b610e3283610d90565b946020939093013593505050565b600080600080600060608688031215610e57578081fd5b853567ffffffffffffffff80821115610e6e578283fd5b610e7a89838a01610dac565b90975095506020880135915080821115610e92578283fd5b50610e9f88828901610dac565b96999598509660400135949350505050565b600060208284031215610ec2578081fd5b81356001600160e01b031981168114610e10578182fd5b600060208284031215610eea578081fd5b813560028110610e10578182fd5b600060208284031215610f09578081fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b81516001600160a01b03168152602080830151908201526040820151608082019060028110610f8457634e487b7160e01b600052602160045260246000fd5b806040840152506060830151151560608301529291505056fea2646970667358221220b38927c583bf9e781f89920118135d3f1b93cefa5ec6c33bc489d7024a1aacc864736f6c63430008040033", "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80637a38f9eb116100665780637a38f9eb146100f05780638d67799e146101035780638da5cb5b1461011d578063e0f5ee3214610138578063f2fde38b1461015857600080fd5b806301ffc9a7146100985780632db62249146100c0578063715018a6146100d557806374a8f103146100dd575b600080fd5b6100ab6100a6366004610eb1565b61016b565b60405190151581526020015b60405180910390f35b6100d36100ce366004610e40565b6101a2565b005b6100d3610769565b6100d36100eb366004610df6565b61079f565b6100ab6100fe366004610ef8565b610ac6565b61010b600281565b60405160ff90911681526020016100b7565b6000546040516001600160a01b0390911681526020016100b7565b61014b610146366004610e17565b610b09565b6040516100b79190610f45565b6100d3610166366004610df6565b610c3e565b60006001600160e01b0319821663c3d3c49360e01b148061019c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6000546001600160a01b031633146101d55760405162461bcd60e51b81526004016101cc90610f10565b60405180910390fd5b8382146102185760405162461bcd60e51b8152602060048201526011602482015270084a89a7440aea49e9c8ebe988a9c8ea89607b1b60448201526064016101cc565b600284146102585760405162461bcd60e51b815260206004820152600d60248201526c42544d3a204d41585f53495a4560981b60448201526064016101cc565b7f00000000000000000000000000000000000000000000000000000000000000008114156102ba5760405162461bcd60e51b815260206004820152600f60248201526e212a269d1029a0a6a2afa1a420a4a760891b60448201526064016101cc565b600061031b868660018181106102e057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906102f59190610df6565b7f0000000000000000000000000000000000000000000000000000000000000000610cd9565b6000818152600160205260409020549091501561036e5760405162461bcd60e51b81526020600482015260116024820152701095134e8814d3d55490d157d1561254d5607a1b60448201526064016101cc565b60006103af8787600081811061039457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906103a99190610df6565b84610cd9565b600081815260016020526040902054909150156104025760405162461bcd60e51b81526020600482015260116024820152701095134e8815105491d15517d1561254d5607a1b60448201526064016101cc565b600082815260016020526040808220839055828252808220849055805160808101909152808989848161044557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061045a9190610df6565b6001600160a01b031681526020017f00000000000000000000000000000000000000000000000000000000000000008152602001878760008181106104af57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104c49190610ed9565b60018111156104e357634e487b7160e01b600052602160045260246000fd5b8152602001600115158152509050600060405180608001604052808a8a600181811061051f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105349190610df6565b6001600160a01b031681526020018681526020018888600181811061056957634e487b7160e01b600052603260045260246000fd5b905060200201602081019061057e9190610ed9565b600181111561059d57634e487b7160e01b600052602160045260246000fd5b81526001602091820181905260008781526002808452604091829020875181546001600160a01b0319166001600160a01b03909116178155938701518484015590860151908301805494955086949192909160ff191690838181111561061357634e487b7160e01b600052602160045260246000fd5b0217905550606091909101516002918201805461ff0019166101009215159290920291909117905560008481526020828152604091829020845181546001600160a01b0319166001600160a01b03909116178155908401516001828101919091559184015192810180548594929360ff199091169083818111156106a757634e487b7160e01b600052602160045260246000fd5b021790555060609190910151600290910180549115156101000261ff001990921691909117905581516020808401516040519081526001600160a01b03909216917ff4c563a3ea86ff1f4275e8c207df0375a51963f2b831b7bf4da8be938d92876c910160405180910390a280600001516001600160a01b03167ff4c563a3ea86ff1f4275e8c207df0375a51963f2b831b7bf4da8be938d92876c826020015160405161075691815260200190565b60405180910390a2505050505050505050565b6000546001600160a01b031633146107935760405162461bcd60e51b81526004016101cc90610f10565b61079d6000610d40565b565b6000546001600160a01b031633146107c95760405162461bcd60e51b81526004016101cc90610f10565b6000600160006107f9847f0000000000000000000000000000000000000000000000000000000000000000610cd9565b815260208101919091526040016000205490508061084a5760405162461bcd60e51b815260206004820152600e60248201526d1095134e881393d517d1561254d560921b60448201526064016101cc565b600081815260016020526040902054806108975760405162461bcd60e51b815260206004820152600e60248201526d1095134e881393d517d1561254d560921b60448201526064016101cc565b60008281526001602081815260408084208490558484528084208490558584526002808352818520825160808101845281546001600160a01b03168152818601549481019490945290810154929390929184019160ff169081111561090c57634e487b7160e01b600052602160045260246000fd5b600181111561092b57634e487b7160e01b600052602160045260246000fd5b815260029182015460ff6101009091048116151560209283015260008681528383526040808220815160808101835281546001600160a01b031681526001828101549682019690965295810154969750919591939085019291909116908111156109a557634e487b7160e01b600052602160045260246000fd5b60018111156109c457634e487b7160e01b600052602160045260246000fd5b8152600291820154610100900460ff1615156020918201526000878152828252604080822080546001600160a01b031990811682556001808301859055918601805461ffff199081169091558a85528385208054909216825591810193909355919093018054909116905584518582015192519283529293506001600160a01b03909216917fbe9bb4bdca0a094babd75e3a98b1d2e2390633430d0a2f6e2b9970e2ee03fb2e910160405180910390a280600001516001600160a01b03167fbe9bb4bdca0a094babd75e3a98b1d2e2390633430d0a2f6e2b9970e2ee03fb2e8260200151604051610ab791815260200190565b60405180910390a25050505050565b600080610ad4600084610b09565b90508060600151610ae85750600092915050565b80516001600160a01b0316610b005750600192915050565b50600092915050565b604080516080810182526000808252602082018190529181018290526060810182905290600181610b3a8686610cd9565b8152602081019190915260400160002054905080610b58575061019c565b6000837f000000000000000000000000000000000000000000000000000000000000000014610b88575080610b99565b506000818152600160205260409020545b600081815260026020818152604092839020835160808101855281546001600160a01b031681526001808301549382019390935292810154929390929084019160ff90911690811115610bfc57634e487b7160e01b600052602160045260246000fd5b6001811115610c1b57634e487b7160e01b600052602160045260246000fd5b815260029190910154610100900460ff1615156020909101529250505092915050565b6000546001600160a01b03163314610c685760405162461bcd60e51b81526004016101cc90610f10565b6001600160a01b038116610ccd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101cc565b610cd681610d40565b50565b604080517f000000000000000000000000000000000000000000000000000000000000000060208083019190915260609490941b6bffffffffffffffffffffffff191681830152605480820193909352815180820390930183526074019052805191012090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b0381168114610da757600080fd5b919050565b60008083601f840112610dbd578182fd5b50813567ffffffffffffffff811115610dd4578182fd5b6020830191508360208260051b8501011115610def57600080fd5b9250929050565b600060208284031215610e07578081fd5b610e1082610d90565b9392505050565b60008060408385031215610e29578081fd5b610e3283610d90565b946020939093013593505050565b600080600080600060608688031215610e57578081fd5b853567ffffffffffffffff80821115610e6e578283fd5b610e7a89838a01610dac565b90975095506020880135915080821115610e92578283fd5b50610e9f88828901610dac565b96999598509660400135949350505050565b600060208284031215610ec2578081fd5b81356001600160e01b031981168114610e10578182fd5b600060208284031215610eea578081fd5b813560028110610e10578182fd5b600060208284031215610f09578081fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b81516001600160a01b03168152602080830151908201526040820151608082019060028110610f8457634e487b7160e01b600052602160045260246000fd5b806040840152506060830151151560608301529291505056fea2646970667358221220b38927c583bf9e781f89920118135d3f1b93cefa5ec6c33bc489d7024a1aacc864736f6c63430008040033", "devdoc": { "kind": "dev", "methods": { "getLocal(address,uint256)": { "details": "This should be responsible to get token mapping for current chain", "params": { "sourceAddr": "address of source token", "targetChainId": "of token on target" } }, "issue(address[],uint8[],uint256)": { "details": "This should be responsible to connect tokens between chains", "params": { "issueTypes": "for tokens", "targetChainId": "of remote token", "tokens": "addresses on link connection" } }, "owner()": { "details": "Returns the address of the current owner." }, "renounceOwnership()": { "details": "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." }, "revoke(address)": { "details": "This should be responsible to remove tokens connection between chains", "params": { "targetAddr": "address of target token" } }, "supportsInterface(bytes4)": { "details": "See {IERC165-supportsInterface}." }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." } }, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 }, "storageLayout": { "storage": [ { "astId": 1069, "contract": "contracts/managers/BridgeTokenManager.sol:BridgeTokenManager", "label": "_owner", "offset": 0, "slot": "0", "type": "t_address" }, { "astId": 4718, "contract": "contracts/managers/BridgeTokenManager.sol:BridgeTokenManager", "label": "_keychain", "offset": 0, "slot": "1", "type": "t_mapping(t_bytes32,t_bytes32)" }, { "astId": 4723, "contract": "contracts/managers/BridgeTokenManager.sol:BridgeTokenManager", "label": "_tokens", "offset": 0, "slot": "2", "type": "t_mapping(t_bytes32,t_struct(Token)4009_storage)" } ], "types": { "t_address": { "encoding": "inplace", "label": "address", "numberOfBytes": "20" }, "t_bool": { "encoding": "inplace", "label": "bool", "numberOfBytes": "1" }, "t_bytes32": { "encoding": "inplace", "label": "bytes32", "numberOfBytes": "32" }, "t_enum(IssueType)3999": { "encoding": "inplace", "label": "enum RToken.IssueType", "numberOfBytes": "1" }, "t_mapping(t_bytes32,t_bytes32)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => bytes32)", "numberOfBytes": "32", "value": "t_bytes32" }, "t_mapping(t_bytes32,t_struct(Token)4009_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct RToken.Token)", "numberOfBytes": "32", "value": "t_struct(Token)4009_storage" }, "t_struct(Token)4009_storage": { "encoding": "inplace", "label": "struct RToken.Token", "members": [ { "astId": 4001, "contract": "contracts/managers/BridgeTokenManager.sol:BridgeTokenManager", "label": "addr", "offset": 0, "slot": "0", "type": "t_address" }, { "astId": 4003, "contract": "contracts/managers/BridgeTokenManager.sol:BridgeTokenManager", "label": "chainId", "offset": 0, "slot": "1", "type": "t_uint256" }, { "astId": 4006, "contract": "contracts/managers/BridgeTokenManager.sol:BridgeTokenManager", "label": "issueType", "offset": 0, "slot": "2", "type": "t_enum(IssueType)3999" }, { "astId": 4008, "contract": "contracts/managers/BridgeTokenManager.sol:BridgeTokenManager", "label": "exist", "offset": 1, "slot": "2", "type": "t_bool" } ], "numberOfBytes": "96" }, "t_uint256": { "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" } } } }